?rbind
df1 <- data.frame(matrix(rep(0,9),nrow=3))
names(df1) <- c("x1","x2","x3")
rbind(df,df1)
--- On Fri, 10/23/09, Ashta <[email protected]> wrote:
> From: Ashta <[email protected]>
> Subject: [R] Inserting rows
> To: "R help" <[email protected]>
> Received: Friday, October 23, 2009, 9:44 AM
> Hi all,
>
> I have the data set df with three varaibles,
>
> x1 x2 x3
> 1 2 5
> 2 4 1
> 5 6 0
> 1 1 2
>
> I want to insert more rows ( eg, 3 rows with value
> filled with zeros)
> 1 2 5
> 2 4 1
> 5 6 6
> 1 1 2
> 0 0 0
> 0 0 0
> 0 0 0
>
> Can any body help me out?
>
> Thanks
>
> ______________________________________________
> [email protected]
> 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.
>
__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
______________________________________________
[email protected] 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.