DOI-USGS / loadflex

Models and Tools for Watershed Flux Estimates
http://dx.doi.org/10.1890/ES14-00517.1
Other
14 stars 17 forks source link

Question: How to format data? #235

Closed adesorme closed 5 years ago

adesorme commented 6 years ago

I can't find the lamprey data used in the examples, so I can't see how the data should be set up. Right now my concentration data has NA values because I have hourly cfs and quarterly NO3, but I can't tell if there is another way I need to set this up? Thanks!

aappling-usgs commented 6 years ago

You can see some example data by running

library(loadflex)
head(eg_fitdat) # the format of the data you should use to fit a data. There must be no NAs and need not have continuous discharge data.
head(eg_estdat) # the format of the data you should use to predict concentration and/or load from a fitted model. These should contain continuous discharge data and do not need any concentration observations at all
adesorme commented 6 years ago

Thank you for your response, I've tried looking at the data and when I run:

library(loadflex) head(eg_estdat) Error in head(eg_estdat) : object 'eg_estdat' not found head(eg_fitdat) Error in head(eg_fitdat) : object 'eg_fitdat' not found

Is there somewhere I need to download this data?

adesorme commented 6 years ago

I tried to recreate this data using:

eg_fitdat <- lamprey_nitrate %>% dplyr::filter(between(DATE, date_range[1], date_range[2])) %>% dplyr::filter(REGR==TRUE) %>% slice(sort(sample.int(n(), size=50))) %>% select(-REGR)

but I can't find the lamprey_nitrate data I need to create it

aappling-usgs commented 6 years ago

What version of loadflex do you have?

packageVersion('loadflex')
adesorme commented 6 years ago

1.1.11

aappling-usgs commented 6 years ago

OK, the new data names might be new since then. You can get 1.2.0 from

devtools::install_github('USGS-R/loadflex')

and I'm hoping to have a 2.0 out pretty darn soon.

adesorme commented 6 years ago

Wonderful, thanks so much!