【发布时间】:2020-11-19 14:23:40
【问题描述】:
我有一个在其他地方找不到的非常基本的问题,我有几百万随着时间的推移被跟踪的人的数据。我想使用View 函数检查 ID 号为 505233 的人。或者例如,我想检查在第二和第三国家的人,特别是不包括其他国家。
我知道这段代码:View(df[, c("id", "country", "health")]) 将我感兴趣的变量返回给我,但是变量本身的更多细节呢,有人可以指导我吗?
id country health
12442 1 8
366453 2 9
366453 2 8
505233 3 8
505233 3 10
structure(list(id = structure(c(12442, 366453, 366453, 505233,
505233), format.stata = "%9.0g"), country = structure(c(1, 2,
2, 3, 3), format.stata = "%9.0g"), health = structure(c(8, 9,
8, 8, 10), format.stata = "%9.0g")), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
【问题讨论】:
-
如果答案对您有用,您能否接受它,以便将这个问题从“未回答的问题”列表中删除?
标签: r hierarchical-data panel-data