Hi Mike, This looks to me as though the error is not being generated by plot, but by a method specific to the package, maybe something with a name like plot.chart_Series, that is barfing on a vector of NA values.
Jim On Mon, Aug 24, 2020 at 1:01 AM Mike <mi...@posteo.nl> wrote: > > Hi Jim, > > on 21.08. you wrote: > > > Try this: > > > > plot (chart_Series (sample.xts[,1], subset=subset, TA=ta), > > type="n",ylim=c(minimum,maximum)) > > > > where minimum and maximum are the extremes of the plot if there were > > any valid values. > > I've set > minimum <- 0 > maximum <- 1 > > The error persists. > > But besides that, passing 'type="n"' to plot would only make sense > when called once an I know there are only NAs to plot. Since I want to > generate many charts in a loop I would have to check for plotable data > first to decide if 'type="n"' should be passed. > > As a workaround for now I do something similar. I check if the range > to be plotted is completely NA. If so I manipulate one of those > observations (which can only be 0, 1 or NA) to an "illegal" value of > 0.5. > > Mike > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.