Re: [R] function completing properly

2014-07-10 Thread PIKAL Petr
gt; Sent: Thursday, July 10, 2014 1:48 AM > To: r-help@r-project.org > Subject: [R] function completing properly > > Hi R community, > i created a function (mkdate) as follows: > > mkdate = function(x) { > x$date = as.Date(paste(x$year, x$month, x$day, sep="-")) > x$wy =

Re: [R] function completing properly

2014-07-10 Thread Jim Lemon
On Wed, 9 Jul 2014 04:47:39 PM Janet Choate wrote: > Hi R community, > i created a function (mkdate) as follows: > > mkdate = function(x) { > x$date = as.Date(paste(x$year, x$month, x$day, sep="-")) > x$wy = ifelse(x$month >=10, x$year+1, x$year) > x$yd = as.integer(format(as.Date(x$date), format=

Re: [R] function completing properly

2014-07-09 Thread Jeff Newmiller
I think you are mistaken. Please provide an example of how you used this function in any version of R that behaved as you describe. Also, please post in plain text to avoid the what-you-see-is-not-what-we-see feature that HTML email provides. --

[R] function completing properly

2014-07-09 Thread Janet Choate
Hi R community, i created a function (mkdate) as follows: mkdate = function(x) { x$date = as.Date(paste(x$year, x$month, x$day, sep="-")) x$wy = ifelse(x$month >=10, x$year+1, x$year) x$yd = as.integer(format(as.Date(x$date), format="%j")) x$wyd = cal.wyd(x) x } the function results in adding the