Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
过滤其 IQR 之间的所有列的数据。尝试使用 filter_all(df_name,IQR(.)),返回相同的数据帧
IQR返回第 25 和第 75 分位数之间距离的单个值。要获取此范围内的所有数据,最好quantile直接使用该函数。这是您可以使用的方法dplyr::filter
IQR
quantile
dplyr::filter
data <- tibble::tibble(x = rnorm(100)) data %>% dplyr::filter(x > quantile(x, 0.25), x < quantile(x, 0.75))