Try this:

as.data.frame(append(iris, 1, after = 2))


On Tue, Nov 9, 2010 at 12:25 PM, Mohan L <l.mohanphys...@gmail.com> wrote:

> Dear All,
>
> I have a data frame with  5 column and 201 row data. I want to add one
> more column between column 1 and 2 with value of 1. So the new column
> has to be the second column filled with 1. Any help will be
> appreciated.
>
> Thanks for your time.
>
>
> Thanks & Rg
> Mohan L
>
> ______________________________________________
> 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
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