search for: xvarcol

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

2012 Aug 11
1
using eval to handle column names in function calling scatterplot graph function
...UE column in the data.frame based on function argument (xvar) 3. generate charts plotvar <- function(parentdf,colname, parmname,xvar,yvar ){ subdf <- parentdf[substr(colname,1,nchar(parmname)) == parmname,] names(subdf) <- sub('PARMVALUE',xvar, names(subdf)) xvarcol <- paste("subdf","$",xvar,sep="") yvarcol <- paste("subdf","$",yvar,sep="") hist(eval(parse(text = xvarcol)), xlab = xvar, main = paste ("Distribution of ",xvar,sep="")) boxplot(eval(parse(text =...