x <- cbind(x[,1:29], newcolumn, x[,30:ncol(x)])

On Mon, Aug 1, 2011 at 12:59 PM, Bansal, Vikas <vikas.ban...@kcl.ac.uk> wrote:
> Dear all,
>
> I have a very simple question.I have data frame of 50 columns and i want to 
> insert a column in 30th position.But i do not want to delete that column.Is 
> it possible to include a column in between, so that new values are in 30th 
> column and 30 th column is now 31st and 31st is 32nd......so on and 50th 
> column is 51st..?I will be very thankful to you.
>
>



-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to