我已經寫了下面的代碼,我想將這些表連接到一個大表中;那麼如何使用SQL做R中如何在r中使用sql將兩個或多個表合併爲一個
user_lessthan10per <- sqldf("select count(uid) as count_of_students
from adopted_user_point
where points_scored between 0 and (1469*0.1)")
接下來是
user_lessthan20per <- sqldf("select count(uid) as count_of_students
from adopted_user_point
where points_scored >(1469*0.1) and points_scored <= (1469*0.2)")
,
user_lessthan30per <- sqldf("select count(uid) as count_of_students
from adopted_user_point
where points_scored >(1469*0.2) and points_scored <= (1469*0.3)")
現在我想將它加入到含有這些三個表count_of_students列一個表。
如何在R我有UNION命令,但它顯示錯誤。