我有一個大資料集,只想從Time (h)列中選擇整數值,使用 dplyr 實作這一目標的代碼是什么?資料集的一部分的影像
uj5u.com熱心網友回復:
你可以試試:
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)
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/383106.html
標籤:r
上一篇:將7列的資料分類為2
