[R] why my R^2 is so small while there do seem to be a dependency there?

2013-08-04 Thread CHEN, Cheng
is not captured by a linear model. Is my understanding correct? so R gurus, which model do you suggest me to try for such data? Thanks! -- *CHEN*, Cheng [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] How to run lm for each subset of the data frame, and then aggreage the result?

2013-05-19 Thread CHEN, Cheng
,] 2.369560 How should I proceed? can anyone help? -- *CHEN*, Cheng [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] Why my lapply doesn't work with FUN=as.Date

2012-12-08 Thread CHEN, Cheng
Hi, guys I don't understand why I can apply as.Date to a single item in the list: as.Date(alldays[4]) [1] 29-03-20 but when I try to lapply as.Date to all the items, i got a sequence of neg numbers: sapply(alldays[1:4], FUN=as.Date) 03-04-2012 02-04-2012 30-03-2012 29-03-2012 -718323