I was able to get the plot by converting the dates in the "date" column to dates, e.g.,

mytable<-read.csv("MCNP-pH.csv")
newdate<-with(mytable,strptime(date,"%m/%d/%Y"))
mytable$date<-newdate
smoothTrend(mytable, pollutant = "pH")

Clint Bowman                    INTERNET:       cl...@ecy.wa.gov
Air Quality Modeler             INTERNET:       cl...@math.utah.edu
Department of Ecology           VOICE:          (360) 407-6815
PO Box 47600                    FAX:            (360) 407-7534
Olympia, WA 98504-7600

        USPS:           PO Box 47600, Olympia, WA 98504-7600
        Parcels:        300 Desmond Drive, Lacey, WA 98503-1274

On Thu, 19 Apr 2012, David Doyle wrote:

I'm trying to plot smooth trend using smoothTrend in OpenAir but I'm having
problems.

I used the following code.
---------------------------------------------------------------------------------
#Set my working dir to the dir with my files
setwd("c:/R")

#Load the openair library
library(openair)

#Load the data
mydata <- read.table("MCNP-pH.csv", header=TRUE, sep=",",)

#Plot the data
smoothTrend(mydata, pollutant = "pH")
---------------------------------------------------------------------------------


I get the following error:
Error in seq.int(0, to0 - from, by) : 'to' must be finite
In addition: Warning messages:
1: In min.default(c(NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,  :
 no non-missing arguments to min; returning Inf
2: In max.default(c(NA_real_, NA_real_, NA_real_, NA_real_, NA_real_,  :
 no non-missing arguments to max; returning -Inf


A copy of the data can be found at
www.doylesdartden.com/e/MCNP-pH.csv

Any suggestions??

Thank you
David

        [[alternative HTML version deleted]]

______________________________________________
R-help@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@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.

Reply via email to