Wednesday, December 28, 2011

Creating a sequence of dates in R

Creating a sequence of dates in R

To create a sequence of dates in R you can use the as.Date() function along with seq() function. Following are some examples. While your needs may be different, this will help you get started.

1. Creating a sequence of dates by specifying the start date and number of days

2. Creating a sequence of dates by specifying the start date and an end date

No comments:

Post a Comment