search for: txt_to_run

Displaying 1 result from an estimated 1 matches for "txt_to_run".

2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
...ion boxplot.add.outlier.text <- function(DATA, x_name, y_name, label_name) { boxplot.outlier.data <- function(xx, y_name) { y <- xx[,y_name] boxplot_range <- range(boxplot.stats(y)$stats) ss <- (y < boxplot_range[1]) | (y > boxplot_range[2]) return(xx[ss,]) } require(plyr) txt_to_run <- paste("ddply(DATA, .(",x_name,"), boxplot.outlier.data, y_name = y_name)", sep = "") ourlier_df <- eval(parse(text = txt_to_run)) # head(ourlier_df) txt_to_run <- paste("formula(",y_name,"~", x_name,")") formu <- eval(par...