【发布时间】:2018-11-03 12:58:38
【问题描述】:
我正在使用
assign( paste("ship", b, sep = ""),c())
作为一个向量,我想保存矩阵中某些元素的坐标。
现在我想使用向量,例如第一个向量名为 ship1,我想向该向量添加元素,但我不能使用 append 和 paste("ship", b, sep = " ") 因为我收到此错误
Error in paste("barco", b, sep = "") <- append(paste("barco", b, sep = ""), :
target of assignment expands to non-language object
我的问题是:如何使用我的向量而不专门使用 ship1,从而能够使用通用方法来填充所有其他“ship b”向量
【问题讨论】:
标签: r