search for: yvarcol

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

Did you mean: xvarcol
2012 Aug 11
1
using eval to handle column names in function calling scatterplot graph function
...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 = yvar))~HMA, ylab=yvar, xlab="HMA", data=subdf) plot(eval(pars...