Description Usage Arguments Details Value See Also Examples
View source: R/get_data_from_Robj.R
this function extracts the snow data from a saved robj
file which consists of a list of stations like described in the Details section
1 | get_data_from_Robj(dataname, measurements_barrier = 10)
|
dataname |
the dataname of the saved |
measurements_barrier |
how many measurements does each station has to have at least. those stations are used later on in the optimization (see functions |
the saved robj
file should include a list of stations with dataframes meta and data. stations are ordered via station number.
meta should include stnr, lon, lat and alt
data should include year, sd, swe, date.sd and date.swe
see also the sample snow data from 36 examplary stations distributed over Austria:
‘sample_snow_data’
a list with
snow_data |
the data of the saved file (as a list). |
sd_max_data |
a matrix with the yearly maxima of snow depth (sd). each row corresponds to one station, columns are the corresponding years. matrix might contain |
swe_max_data |
a matrix with the yearly maxima of snow water equivalent (swe). each row corresponds to one station, columns are the corresponding years. matrix might contain |
covariables |
a matrix with the covariables for each station. each row corresponds to one station, columns are lon (longitude), lat (latitude), alt (altitude), mdday (mean of the time difference in days of sd and swe maxima), sd_mmax (mean maxima of sd over all years) and swe_mmax (mean maxima of swe over all years) |
model_selection
, optimizer_smooth_model
, optimizer_biv_hr_model
1 2 3 4 5 6 7 | # load sample_snow_data and save it to working directory
data(sample_snow_data)
save(sample_snow_data, file = "sample_snow_data.robj")
get_data =
get_data_from_Robj(dataname = "sample_snow_data.robj",
measurements_barrier = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.