| writePro | R Documentation |
Write SNOWPACK PRO files from a snowprofileSet.
writePro(
profiles,
filename,
meta = NaN,
header_comment = "time of creation and SNOWPACK version unknown"
)
profiles |
snowprofileSet object to write. |
filename |
output file path ending in |
meta |
optional profile metadata (defaults to |
header_comment |
character string added to the file header. |
Writes a PRO file to disk; returns NULL invisibly.
snowprofilePro
## Path to example pro file
Filename <- system.file('extdata', 'example.pro', package = 'sarp.snowprofile')
## Read entire time series and plot
Profiles <- snowprofilePro(Filename)
plot(Profiles, main = 'Timeseries read from example.pro')
## Write to file
tmppath = tempfile(pattern = "written_", fileext = ".pro")
writePro(Profiles, tmppath)
## Re-read from tempfile
Profiles2 <- snowprofilePro(tmppath)
(testbool <- all(Profiles[[1]]$layers == Profiles2[[1]]$layers))
if (!testbool) stop("error in writePro re-reading!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.