zl程序教程

您现在的位置是:首页 >  其它

当前栏目

r指定位置插入一列数值

指定 插入 位置 数值 一列
2023-09-14 08:59:52 时间
  1. y<-1:4
  2. data1 <-data.frame(x1=c(1,3,5,7), x2=c(2,4,6,8),x3=c(11,12,13,14),x4=c(15,16,17,18))
  3. data2<-cbind(data1[,1:2],y,data1[,3:ncol(data1)])