[R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
Dear R forum I have a data.frame df = data.frame(dates = c(4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as Current_date, 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013,  Current_date, 4/15/2013, 4/14/2013,

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread andrija djurovic
?rep On Wed, Apr 17, 2013 at 11:11 AM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R forum I have a data.frame df = data.frame(dates = c(4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
, 17/4/13, andrija djurovic djandr...@gmail.com wrote: From: andrija djurovic djandr...@gmail.com Subject: Re: [R] Creating a vector with repeating dates To: Katherine Gobin katherine_go...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Date: Wednesday, 17 April, 2013, 10:14 AM ?rep On Wed

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Rui Barradas
Hello, Try the following. rep(c(Current_date, as.character(df$dates)), 3) Hope this helps, Rui Barradas Em 17-04-2013 10:11, Katherine Gobin escreveu: Dear R forum I have a data.frame df = data.frame(dates = c(4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013), values = c(47, 38, 56, 92)) I

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread andrija djurovic
or not? Regards Katherine --- On *Wed, 17/4/13, andrija djurovic djandr...@gmail.com* wrote: From: andrija djurovic djandr...@gmail.com Subject: Re: [R] Creating a vector with repeating dates To: Katherine Gobin katherine_go...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Date

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Jim Lemon
On 04/17/2013 07:11 PM, Katherine Gobin wrote: Dear R forum I have a data.frame df = data.frame(dates = c(4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as Current_date, 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013,

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
Dear Sir, Thanks a lot for your valuable suggestions and help. Regards Katherine --- On Wed, 17/4/13, Jim Lemon j...@bitwrit.com.au wrote: From: Jim Lemon j...@bitwrit.com.au Subject: Re: [R] Creating a vector with repeating dates To: Katherine Gobin katherine_go...@yahoo.com Cc: r-help@r