- R is used more and more
- So also for executing R-scripts
Friday, June 06, 2014
#!/usr/bin/Rscript my_model <- lm(data=iris, Sepal.Width ~ Sepal.Length) print(coef(my_model))
#!/usr/bin/Rscript my_data <- iris dep <- "Sepal.Width" indep <- "Sepal.Length" f <- as.formula(paste0(dep, " ~ ", indep)) my_model <- lm(data=my_data, f) print(coef(my_model))