Displaying 1 result from an estimated 1 matches for "sqlout".
Did you mean:
shout
2010 Jul 22
4
SQL/R
Dear R users,
I want to aggregate data in the following way:
###
X <- data.frame(u = c("T1","T1","T1","T2"), v=c("a","a","b","a"))
X
library(sqldf)
sqlOut <- sqldf("select count(distinct(v)) from X group by u")
sqlOut
###
Now I want to get the same result without using SQL. How can I achieve
that ?
Thanks for your help,
Gildas