Re: [R] changing the day of the week in dates format

2011-05-15 Thread Adrian Duffner
rement the date by a year - how would I account > for things like leap years? > > Would I just do > > mydaysx[select] <- mydaysx[select] + 365.25*24*60*60 > > Regards, > Dave > > *From:* A

Re: [R] changing the day of the week in dates format

2011-05-15 Thread Adrian Duffner
Hi Dave, your problem is that you are working with a S3 class, what is mainly a list with naming convention. Hence it is possible to change just one entry of the list, but it is nearly never recommendable. So a slight change to your code should provide you the required output: > mydaysx[selec

Re: [R] as.matrix strangeness

2011-04-15 Thread Adrian Duffner
Hallo Michael, check ?matrix and compare to as.matrix. as.matrix does not provide a ncol argument. To get a 2 by 2 matrix use matrix(a, ncol=2) Regards Adrian Am 15.04.2011 11:42, schrieb Michael Bach: Dear R users, I presume there is something foul with system: a<- c(1,2,3,4) as.matrix(a,