Marina
Marina

Reputation: 13

Error checkPrep(mydata, vars, type, remove.calm = FALSE) in R

I get an error "checkPrep(mydata, vars, type, remove.calm = FALSE) Can't find the variable(s) ch4" when using the function trajLevel in OpenAir package (R). I attach screenshots and my code.

dat <- read.csv("C:/Users/Home/Documents/Old_disser/STATYA/Disser.csv",
                sep=";",header=TRUE,na.strings = "-999.9")
dat$date <- dmy_hm(dat$date)
colnames(dat) <-c("date","wd","ws","co2","ch4","zL")

trajLevel(traj, pollutant = "ch4", 
          statistic = "difference",
          col = c("skyblue", "white", "tomato"), 
          min.bin = 50, 
          border = NA)

enter image description here enter image description here

I read about the problem when the error occurs due to incorrect reading of the date, but in my case the date has POSIXct format.I checked the structure and data type after reading the file, and did not find any errors. Any other functions in openair work without failures using the .csv file. This problem occurred only with trajLevel function.

My .csv file is

enter image description here

I would be very grateful for advice on solving this problem!

Upvotes: 0

Views: 61

Answers (0)

Related Questions