r - zoo error - $ operator is invalid for atomic vectors -
i've created zoo object in order apply hargreavessamani et (evapotranspiration) function this package.
the input data file here , code i've used below notes.
require(evapotranspiration) require(zoo) data("constants") oakpark<- read.csv("oakparkr.csv", header=true) #fill blanks in csv nas na.fill(oakpark,na) #convert zoo oakpark <- as.zoo(oakpark) #create zoo series required variables pe.data <- oakpark[ ,c(3,5)] #defining function , associating data function class funname <- "hargreavessamani" class(pe.data) <- funname
then when applying function:
results <- et(pe.data,constants)
i following error:
error in data$tmax : $ operator invalid atomic vectors
i've tried converting large zoo data frame , trying again et function works on zoo series, didn't work either.
other pages '$ operator invalid atomic vectors' seem suggest changing format of data, need find way around without doing that.
Comments
Post a Comment