wide2long | R Documentation |
Convert a dataframe in wide format to long format.
wide2long(data, depths)
data |
dataframe; values loaded with get_vari() |
depths |
dataframe; depths loaded with get_vari() or vector of depths corresponding to values in the datafra |
dataframe in the same format as the observation file
sim_folder <- system.file('extdata', package = 'GOTMr')
GOTMr::run_gotm(sim_folder)
out <- file.path(sim_folder, 'output', 'output.nc')
wtemp <- get_vari(ncdf = out, var = 'temp')
z <- get_vari(ncdf = out, var = 'z')
df <- wide2long(data = wtemp, depths = z)
head(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.