Hi, all. I'm trying to create a plot that has a range of about an hour on the x axis, starting at about 10:15. I have a way I'm currently doing it but it's not working. this is what I want on the x axis: | | | | | | | | | | ---------------------------------------------- 10:15 10:25 10:35 10:45 10:55 11:05 11:15 what's the best way to plot this out like this? currently, I'm using seq() to start at 10:15, incrementing by a second, but in that case I get 20:00 30:00 40:00 50:00 00:00 on my x axis, which is not what I want... any suggestions? thanks! greg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 5 Jul 2001, Greg Trafton wrote:> Hi, all. I'm trying to create a plot that has a range of about an > hour on the x axis, starting at about 10:15. > > I have a way I'm currently doing it but it's not working. this is > what I want on the x axis:You can get whatever you want on the axis with the axis() command. Draw the plot with the xaxt="n" option and then draw the axis with axis(). -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hello. I just downloaded 1.3.0 for windows from CRAN. I used the big file with everything included. Then I run Update.packages() to set all the packages from CRAN to the latest version. After downloading and installing several packages and when updating the compiled HTML help files i got: Error in file(f.tg, open="w") cannot open file "C:\R\RW1030|doc/html/search/index.txt" Any idea of what is wrong? Thanks. R. Heberto Ghezzo Ph.D. Meakins-Christie Labs McGill University Montreal - Canada heberto at meakins.lan.mcgill.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Greg Trafton wrote:> Hi, all. I'm trying to create a plot that has a range of about an > hour on the x axis, starting at about 10:15...This may be way too late, but here's a way to do what you want (I think). First, to get the special X axis, use: plot(...,axes=F,...) then add the Y axis, axis(2) now, you will have to get a list of times in character format for your X axis. Here's a function that will give you equally spaced time intervals in the usual format. time.strings<-function(start,end,increment=1,split=":") { if(nargs() >= 3) { startlist<-unlist(strsplit(start,split)) if(length(startlist) == 2) { endlist<-unlist(strsplit(end,split)) if(length(endlist) == 2) { starthour<-as.numeric(startlist[1]) endhour<-as.numeric(endlist[1]) if(starthour <= endhour) hourlist<-as.character(starthour:endhour) else hourlist<-as.character(c(starthour:12,1:endhour)) startminute<-as.numeric(startlist[2]) endminute<-as.numeric(endlist[2]) nhours<-length(hourlist) timelist<-vector("character",nhours * 60/increment) timeindex<-1 for(hourindex in 1:nhours) { if(hourindex == nhours) maxminute<-endminute else maxminute<-59 while(startminute <= maxminute) { timelist[timeindex]<-paste(hourlist[hourindex], formatC(startminute,width=2,flag="0"),sep=":") startminute<-startminute+increment timeindex<-timeindex+1 } startminute<-startminute-60 } timeindex<-timeindex-1 return(timelist[1:timeindex]) } else cat("end does not seem to be a valid time string\n") } else cat("start does not seem to be a valid time string\n") } else cat("Usage: time.strings(start,end,increment)\n") } Note that this function will only work for at most 1 day! (I suppose you could call it once for each day and concatenate.) You could call this as: timestrings<-time.strings("10:15","11:15",10) and finally you can add the X axis axis(1,at=1:length(timestrings),labels=timestrings) Hope this helps, Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._