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 wrote: From: Jim Lemon Subject: Re: [R] Creating a vector with repeating dates To: "Katherine Gobin" Cc: r-help@r-project.org Date: Wednesday, 17 April, 2013, 10:35

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

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread andrija djurovic
> So this is combination of dates and a string. Hence, I am just wondering > if it is possible to create such a vector or not? > > Regards > > Katherine > > > --- On *Wed, 17/4/13, andrija djurovic * wrote: > > > From: andrija djurovic > Subject: Re: [R] Cr

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,

Re: [R] Creating a vector with repeating dates

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

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 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/

[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