此 R 代码中的 [1] 是指索引还是取第一个值?这条消息在 R 中意味着什么?

问题描述 投票:0回答:0

这段代码中的 [1] 是否意味着这将取索引 1 的值?有人可以帮我用 R 解释下面的代码吗?

select((as.character(time):as.character(timeWindow))) >= sum(productList)) %>% 
                colnames)[1]),
        as.numeric(Data[["Invent"]] %>% 
          filter(Time != "Cap") %>% 
          select_if(function(col) is.numeric(col) && all(col >= productList)) %>%  
            colnames)[1])
r indexing mean
© www.soinside.com 2019 - 2024. All rights reserved.