Re: [R] zoo object won't plot

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri, 07 Mar 2008 14:40:20 -0500

  1. This is not reproducible. Lines was not provided in reproducible form. Please look at my prior emails and use that form so that one can copy from your post and paste it directly into R and observe the error.
  2. What do you mean by does not plot? Do you get an error or does nothing appear? If its the latter its because there are no lines in the plot, only disjoint points separated by NAs so one would not expect there to be any lines.
plot(na.omit(z1))
plot(na.approx(z1, na.rm = FALSE))
plot(z1, type = "p")

would all create plots with lines (or points) if that's the problem.

On Fri, Mar 7, 2008 at 1:53 PM, stephen sefick <ssefick_at_gmail.com> wrote:
> DateTime RM61
> 11/30/2006 12:31 NA
> 11/30/2006 12:46 NA
> 11/30/2006 13:01 2646784125
> 11/30/2006 13:16 NA
> 11/30/2006 13:31 NA
> 11/30/2006 13:46 NA
> 11/30/2006 14:01 2666435177
> 11/30/2006 14:16 NA
> 11/30/2006 14:31 NA
> 11/30/2006 14:46 NA
> 11/30/2006 15:01 2653041914
> 11/30/2006 15:16 NA
> 11/30/2006 15:31 NA
> 11/30/2006 15:46 NA
> 11/30/2006 16:01 2693126189
> 11/30/2006 16:16 NA
> 11/30/2006 16:31 NA
> 11/30/2006 16:46 NA
> 11/30/2006 17:01 2658366411
> 11/30/2006 17:16 NA
> 11/30/2006 17:31 NA
> 11/30/2006 17:46 NA
> 11/30/2006 18:01 2705885426
> 11/30/2006 18:16 NA
> 11/30/2006 18:31 NA
> 11/30/2006 18:46 NA
> 11/30/2006 19:01 2707635675
> 11/30/2006 19:16 NA
> 11/30/2006 19:31 NA
> 11/30/2006 19:46 NA
> 11/30/2006 20:01 2721482049
> 11/30/2006 20:16 NA
> 11/30/2006 20:31 NA
> 11/30/2006 20:46 NA
> 11/30/2006 21:01 2712886423
> 11/30/2006 21:16 NA
> 11/30/2006 21:31 NA
> 11/30/2006 21:46 NA
> 11/30/2006 22:01 2720426598
> 11/30/2006 22:16 NA
> 11/30/2006 22:31 NA
> 11/30/2006 22:46 NA
> 11/30/2006 23:01 2724468912
>
> #read data in as zoo object
> # chron
> library(chron)
> fmt.chron <- function(x) {
> chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x))
> }
> z1 <- read.zoo(textConnection(Lines), sep = ",", header = TRUE, FUN = fmt.chron)
>
> the above data will not plot
>
> #rplot
> plot(z1)
>
>
> --
> Let's not spend our time and resources thinking about things that are
> so little or so large that all they really do for us is puff us up and
> make us feel like gods. We are mammals, and have not exhausted the
> annoying little problems of being mammals.
>
> -K. Mullis
>
> ______________________________________________
> 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.
>



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. Received on Fri 07 Mar 2008 - 19:42:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Mar 2008 - 20:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive