[R] Empty Data Frame

From: Santosh Srinivas <santosh.srinivas_at_gmail.com>
Date: Wed, 27 Apr 2011 13:33:03 +0530

Dear Group,

Is there a more efficient way to create a data frame structure (using rep I guess?)


week <- rdply(10, data.frame(week = 1:52)) names(week) <- c("Year", "Week")
week$Year <- week$Year + 2000

Basically trying to create a year and week data frame to start appending data to for a ggplot.

Many thanks.

        [[alternative HTML version deleted]]

R-help_at_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. Received on Wed 27 Apr 2011 - 08:06:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 10:10:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive