我已经编写了以下代码,我想将这些表连接成一个大表;那么如何使用 SQL 在 R 中做到这一点
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 命令,但它显示错误。