[R] barplot: invalid 'xlim' value

Joshua Wiley jwiley.psych at gmail.com
Sat May 15 20:14:57 CEST 2010

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 familiar with POSIX can explain how to make it
amenable to plot.window.  I tried converting it to numeric, but with
poor results.  In the source code for the graphic you referenced, xlim
is numeric.


On Sat, May 15, 2010 at 10:32 AM, emorway <emorway at engr.colostate.edu> wrote:
> 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 is no typo.  I just can't figure
> out why it needs to be this way for it to work.  As I mentioned, it is
> counter intuitive.
> Eric
> --
> View this message in context: http://r.789695.n4.nabble.com/barplot-invalid-xlim-value-tp2217919p2217953.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org 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.

Joshua Wiley
Senior in Psychology
University of California, Riverside

More information about the R-help mailing list