[R] margins within plotting region
Hi list, there always seem to be a small margin between the actual plot and the axes/box around the plot. For instance, in plot(c(0,1),c(0,1)) the 2 points do not lay on the box around the plot but slightly more to the center. Which parameter controls this margin and is it possible to eliminate it? thanks, Wouter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] postscript rotation (bug?)
hello, when making postscript images with postscript() and converting them to pdf with epstopdf, some images are rotated 90 degrees clockwise. The postscript displays fine (ggv). It seems to be related with length(xlab)/length(ylab), e.g: >postscript("wrong.ps", width=5, height=5, horizontal=F, onefile=F, paper = "special") >plot(1, 1, xlab="short", ylab="abitlonger") >dev.off() If then converted to pdf with epstopf, then wrong.pdf is rotated However, >postscript("OK.ps", width=5, height=5, horizontal=F, onefile=F, paper = "special") >plot(1, 1, xlab="equal", ylab="equal") >dev.off() en then converted to OK.pdf displays OK. Setting horizontal=T does not change anything for the final pdf file. (The .ps is rotated -90 degrees however). Is anyone able to reproduce this problem? I am using fedora core 3. Thanks, Wouter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] repeated measures anova
Hello, what is the best way to do an ANOVA on two-factor experiments with repeated measures on one of the factors (e.g. time) in R, (with Greenhouse-Geisser Epsilon or Huynh-Feldt Epsilon calculation, if possible (as described in Ott and Longnecker, 2001. Statistical Methods and Data Analysis 5th ed., chapter 18)) Thanks, Wouter __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] stepwise regression analysis
Hello, is there a function in R to do stepwise regression analysis (e.g. for backward elimination)? thanks, Wouter __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] daylight saving time problems
Hello, sorry for my mail yesterday about the POSIXct problems. I was a bit tired and now I found out the real problem. When importing time data over a daylight saving time shift, R shifts two times. I don't now whether it is a bug or a (wrongly used) feature If you execute the following code: -- test<-c("31/03/2002 0:00", "31/03/2002 0:15", "31/03/2002 0:30", "31/03/2002 0:45", "31/03/2002 1:00", "31/03/2002 1:15", "31/03/2002 1:30", "31/03/2002 1:45", "31/03/2002 2:00", "31/03/2002 2:15", "31/03/2002 2:30", "31/03/2002 2:45", "31/03/2002 3:00", "31/03/2002 3:15", "31/03/2002 3:30", "31/03/2002 3:45", "31/03/2002 4:00", "31/03/2002 4:15", "31/03/2002 4:30", "31/03/2002 4:45", "31/03/2002 5:00", "31/03/2002 5:15", "31/03/2002 5:30", "31/03/2002 5:45", "31/03/2002 6:00"); timetest<-strptime(as.character(test), format = "%d/%m/%Y %H:%M"); timetest2<-as.POSIXct(timetest); -- then R 1.7.0 gives on my Mandrake 9.1: > test [1] "31/03/2002 0:00" "31/03/2002 0:15" "31/03/2002 0:30" "31/03/2002 0:45" [5] "31/03/2002 1:00" "31/03/2002 1:15" "31/03/2002 1:30" "31/03/2002 1:45" [9] "31/03/2002 2:00" "31/03/2002 2:15" "31/03/2002 2:30" "31/03/2002 2:45" [13] "31/03/2002 3:00" "31/03/2002 3:15" "31/03/2002 3:30" "31/03/2002 3:45" [17] "31/03/2002 4:00" "31/03/2002 4:15" "31/03/2002 4:30" "31/03/2002 4:45" [21] "31/03/2002 5:00" "31/03/2002 5:15" "31/03/2002 5:30" "31/03/2002 5:45" [25] "31/03/2002 6:00" > > timetest [1] "2002-03-31 00:00:00" "2002-03-31 00:15:00" "2002-03-31 00:30:00" [4] "2002-03-31 00:45:00" "2002-03-31 01:00:00" "2002-03-31 01:15:00" [7] "2002-03-31 01:30:00" "2002-03-31 01:45:00" "2002-03-31 03:00:00" [10] "2002-03-31 03:15:00" "2002-03-31 03:30:00" "2002-03-31 03:45:00" [13] "2002-03-31 03:00:00" "2002-03-31 03:15:00" "2002-03-31 03:30:00" [16] "2002-03-31 03:45:00" "2002-03-31 04:00:00" "2002-03-31 04:15:00" [19] "2002-03-31 04:30:00" "2002-03-31 04:45:00" "2002-03-31 05:00:00" [22] "2002-03-31 05:15:00" "2002-03-31 05:30:00" "2002-03-31 05:45:00" [25] "2002-03-31 06:00:00" > > timetest2 [1] "2002-03-31 00:00:00 CET" "2002-03-31 00:15:00 CET" [3] "2002-03-31 00:30:00 CET" "2002-03-31 00:45:00 CET" [5] "2002-03-31 01:00:00 CET" "2002-03-31 01:15:00 CET" [7] "2002-03-31 01:30:00 CET" "2002-03-31 01:45:00 CET" [9] "2002-03-31 03:00:00 CEST" "2002-03-31 03:15:00 CEST" [11] "2002-03-31 03:30:00 CEST" "2002-03-31 03:45:00 CEST" [13] "2002-03-31 03:00:00 CEST" "2002-03-31 03:15:00 CEST" [15] "2002-03-31 03:30:00 CEST" "2002-03-31 03:45:00 CEST" [17] "2002-03-31 04:00:00 CEST" "2002-03-31 04:15:00 CEST" [19] "2002-03-31 04:30:00 CEST" "2002-03-31 04:45:00 CEST" [21] "2002-03-31 05:00:00 CEST" "2002-03-31 05:15:00 CEST" [23] "2002-03-31 05:30:00 CEST" "2002-03-31 05:45:00 CEST" [25] "2002-03-31 06:00:00 CEST" There is a clear time shift timetest[8] and timetest[9] and another one between timetest[12] and timetest[13]. I.e. timetest[9:12] are wrongly converted. In october (reverse timeshift in daylight time) there is no shift at all. It seems that it was a feature before that has been badly patched. I'm using R 1.7.0 on Mandrake Linux in Belgium (CEST?) It does not occur on my MacOSX box (both Darwin and Carbon version); I don't now about the windows version. Thanks, Wouter Buytaert __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] POSIXct troubles
Hello, I'm working with POSIXct objects, and I found some strange behavior. I'm trying to extract a 30min time series from a POSIXct vector, and it seems that R is having problems with daylight saving time: > test [1] "2002-03-31 01:15:00 CET" "2002-03-31 01:30:00 CET" [3] "2002-03-31 01:45:00 CET" "2002-03-31 03:00:00 CEST" [5] "2002-03-31 03:15:00 CEST" "2002-03-31 03:30:00 CEST" [7] "2002-03-31 03:45:00 CEST" "2002-03-31 05:00:00 CEST" [9] "2002-03-31 05:15:00 CEST" "2002-03-31 05:30:00 CEST" [11] "2002-03-31 05:45:00 CEST" "2002-03-31 05:00:00 CEST" [13] "2002-03-31 05:15:00 CEST" "2002-03-31 05:30:00 CEST" [15] "2002-03-31 05:45:00 CEST" "2002-03-31 06:00:00 CEST" [17] "2002-03-31 06:15:00 CEST" "2002-03-31 06:30:00 CEST" [19] "2002-03-31 06:45:00 CEST" "2002-03-31 07:00:00 CEST" #just a time series. > ft<-(as.integer(test)%%1800)==0 > ft [1] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE [13] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE #And now, when extracting the right entries out of "test": > test[ft] [1] "2002-03-31 01:30:00 CET" "2002-03-31 03:00:00 CEST" [3] "2002-03-31 03:30:00 CEST" "2002-03-31 05:00:00 CEST" [5] "2002-03-31 05:30:00 CEST" "2002-03-31 05:00:00 CEST" [7] "2002-03-31 05:30:00 CEST" "2002-03-31 06:00:00 CEST" [9] "2002-03-31 06:30:00 CEST" "2002-03-31 07:00:00 CEST" Here, [4] and [5] are wrong... BTW, is there a way to ask R to use another time zone than the one your computer is in? I'm working on data that do not use daylight saving time, but my computer does (west european time zone) and that's quite confusing when importing/exporting. Thanks, Wouter Buytaert __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help