我得到了以下代码
for (i in c(1:(ncol(df_multi_paths_cols) - 1))) {
df_cache <- df_multi_paths_cols %>%
select(num_range("ord_", c(i, i+1))) %>%
#select within dataset columns with prefix and within specific range i and i+1
na.omit() %>%
# The na.omit R function removes all incomplete cases of a data object
# (typically of a data frame, matrix or vector).
group_by(.dots = c(paste0("ord_", c(i, i+1)))) %>%
#paste=concatenate strings without separator
# group_by() takes an existing tbl and converts it into a grouped tbl where
# operations are …Run Code Online (Sandbox Code Playgroud)