我有两个数组。
使用numpy.append
我们可以合并两个数组。
在R中如何做到同样的事情?
merge
不能做到这一点。
Python 输出/示例:
a=np.array([1,2,3,4,5,5])
b=np.array([0,0,0,0,0,0])
np.append(a,b)
array([1, 2, 3, 4, 5, 5, 0, 0, 0, 0, 0, 0]) # this is what I want
x<-c(mat, (0.0) * (l - length(demeaned)), rep(0, 30 - ncol(mat)))
mat是一个20行的矩阵
l - length(demeaned)
等于10
我希望最终结果是30列
c(a, b)
? - Vincent Guillemot