Appendix 1: Chapter 5: JSL Code to Submit to R

This appendix contains the JSL code to submit R code for developing weights. The R code is written as a string variable, str, that is then submitted to R for processing. R produces a data frame that JMP retrieves and displays as a data table referenced by dt. You can then merge this table with the main data table.
/* define string variable that has the R code */ str = " ## ## Purpose: creates weights based on sample and population key ## demographic frequencies ## ## use survey package ## library(survey) ## ## import data; attach row id ## dpath <- \!"C:\\Users\\Walter\\Documents\\DAC\\JMP\\JMP Book\\Data\\Yogurt\\\!" x <- read.csv(paste(dpath, \!"weight data.csv\!", sep = \!"\!")) n <- nrow(x) ...

Get Market Data Analysis Using JMP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.