Hi,

I have written boxplot commands of this form before, but I don't quite 
understand why the function call is reporting a syntax error in this instance. 
All parameters passed to the function are strings.

Thanks in advance.

Payam

> simplevar <- function(wframe,column1,column2) {
+     tframe <- get(wframe)
+     x1 <- which(names(wframe)==column1)
+     x2 <- which(names(wframe)==column2)
+     print(tframe[x1])
+     print(tframe[x2])
+     gtitle <- paste(names(tframe[x2])," vs. ", names(tframe[x1])
+     quartz(width=7,height=5,dpi=200)
Error: syntax error
>     boxplot(tframe[x2] ~ tframe[x1])
Error in eval(expr, envir, enclos) : object 'tframe' not found
>
> }

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to