将列的名称粘贴到循环中的新列

时间:2015-09-15 07:09:48

标签: r

我正在尝试将'ZS'添加到循环中的列中。我能够为ZS添加一个新的列号,但我也想要它的原始列。

到目前为止我已经

Newdf<-df[, paste0('ZS' , 3:ncol(df))] 

不可能只做

Newdf<-df[, paste0('ZS' , 3:ncol(df),colname(df)] 

1 个答案:

答案 0 :(得分:4)

试试这个:

In [9]: blank_image = cv2.imread('blank.jpg')
In [10]: import matplotlib.pyplot as plt
In [11]: plt.ion()
In [12]: plt.imshow(blank_image)
Out[12]: <matplotlib.image.AxesImage at 0x7fb3cf31bf10>