Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread David Winsemius
On May 15, 2010, at 2:12 PM, emorway wrote: Josh, Thanks for looking into this further. Picking up on your hint I tried to coerce the xlim values as well: barplot(coldat,horiz=TRUE,axes=FALSE,xlim=c(as.numeric(strptime(well. 80.2$date[1],"%m/%d/%Y %H:%M")),as.numeric(strptime(well.80.2$

Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread Joshua Wiley
Eric, I was thinking about it more and if you have all the data in your example read in, look at this: plot(ttime.80.2,well.80.2$Reading,type="l",col="blue",lwd=2) par("usr") barplot(coldat,horiz=TRUE,axes=FALSE,col=8,space=0) par("usr") barplot(coldat,horiz=TRUE,axes=FALSE,y

Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread emorway
Josh, Thanks for looking into this further. Picking up on your hint I tried to coerce the xlim values as well: barplot(coldat,horiz=TRUE,axes=FALSE,xlim=c(as.numeric(strptime(well.80.2$date[1],"%m/%d/%Y %H:%M")),as.numeric(strptime(well.80.2$date[length(well.80.2$date)],"%m/%d/%Y %H:%M"))),yli

Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread Joshua Wiley
Okay, after I got your data in, your issue seems to be with barplots call to plot.window. In particular, plot.window requires xlim and ylim to be numeric vectors (see ?plot.window). In your data > str(xlim) POSIXlt[1:2], format: "2000-06-12 02:00:00" "2000-07-17 01:00:00" Perhaps someone more fa

Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread emorway
Josh, I wonder if you try pulling the data from the post directly it will work better for you: http://r.789695.n4.nabble.com/barplot-invalid-xlim-value-td2217919.html#a2217919 As for your response to the other code I was asking about...that code works perfectly well as it is written, so there i

Re: [R] barplot: invalid 'xlim' value

2010-05-15 Thread Joshua Wiley
Hello, It could be my email client (gmail), but I had an error when trying to paste your data in. Anyway to answer part of your question > # Draw the histograms >for (i in 1:length(ages)){ >par(new = TRUE) >xmin <- -ages[i] + xlim[1] I think your problem

[R] barplot: invalid 'xlim' value

2010-05-15 Thread emorway
Forum, I am attempting to plot weekly horizontal histograms, something very similar to: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=109 The part of the code used to create this graphic that interest me: # Draw the histograms for (i in 1:length(ages)){ p