从R中的数据集中选择整数



我有一个大数据集,并且只想从Time (h)列中选择整数值,使用dplyr实现这一点的代码是什么?数据集的一部分的图像

您可以尝试:

max(data$`Time (h)`) # get the max value in the column
integers <- seq(1, 100, by=1) #replace the 100 value with the max
# then you'll have a list of all integers from 1 to whatever your max is
# find the integers in your data
integers_in_data <-
data %>%
filter(`Time (h)` %in% integers)

最新更新