当数据不是一个list时,情况就不同了。
[] extracts a list, [[]] extracts elements within the list
The [[ form allows only a single element to be selected using integer or character indices, whereas [ allows indexing by vectors.
令一个区别是 [[ 可通过参数“exact”激活模糊匹配,[]则不行。
参考文献1: https://blog.csdn.net/yiifaa/article/details/73252980
参考文献2: https://ask.csdn.net/questions/707505 :
r语言1.R语言基本输出
锡城彭于晏
原创
关注
0点赞·1428人阅读
print()函数:直接输出
数字输出print(123)
字符串输出print("hello world")
输出变量
cat()函数:连续拼接输出多个项目
paste()函数:将其参数转换为字符串并连接他们,字符串之间用 sep间隔分开