有人可以推荐一个函数,可以让我计算并返回列表中的项目数吗?
library(stringr)
l <- strsplit(words, "a")
if(# number of items in list l < 1)
next
最佳答案
Get or set the length of vectors (including lists) and factors, and of any other R object for which a method has been defined.
Get the length of each element of a list or atomic vector (is.atomic) as an integer or numeric vector.
关于list - R:计算列表中对象的数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1740524/