Displaying 1 result from an estimated 1 matches for "atteps".
Did you mean:
attems
2011 Mar 09
2
SQLDF - Submitting Queries with R Objects as Columns
...3,4,5,6,7,8,9,10),c(1,1,1,2,2,2,3,3,3,3))
names(testdf)<-c("X","Y")
# Works as intended
sqldf("select sum(X) as XSUM,
Y as Y
from testdf
group by Y")
# Now... can I reference var1 in the code?
var1<-"X"
# Unsuccessful Atteps
sqldf("select sum(var1) as XSUM,
Y as Y
from testdf
group by Y")
sqldf("select sum(get(var1)) as XSUM,
Y as Y
from testdf
group by Y")
sqldf("select sum(return(var1)) as XSUM,
Y as Y...