实例 R 语言 求向量的长度

x
 
# Find the length of the fruits vector
fruits <- c("banana", "apple", "orange")
length(fruits)
                    

输出结果

[1] 3