read_smn | R Documentation |
SwissMetNet, the automatic monitoring network of MeteoSwiss the Federal Office for Meteorology and Climatology, comprises about 160 automatic monitoring stations. These stations deliver a multitude of current data on the weather and climate in Switzerland every ten minutes. The monitoring network is supplemented by automatic precipitation stations.
This Function autodetects the delimeter and tries to find the interval. In Addition the time information in the files is utc and end time. The time is converted to start time and the time zone defined trough the argument tz. The argument time_shift provides a way to manuelly shift the time series. In this case no automatically shifting is applied. The provided values is directly added to information in the file.
read_smn(
fn,
tz = "Etc/GMT-1",
encoding = "UTF-8",
time_shift = NULL,
time_format = NULL,
interval = NULL,
na.rm = TRUE
)
fn |
path to input file |
tz |
of the output data. Default "Etc/GMT-1" |
encoding |
encoding of the data file. Default = "UTF-8" |
time_shift |
a lubridate period to add to the time. Default NULL |
time_format |
optional time_format. Use if auto detect fails. Default NULL |
interval |
optional interval of the data. Use if auto detect fails. Default NULL. If used it is necessary to define time_shift manuelly. lubridate::period(0) can be used for no shifting |
na.rm |
remove na values. Default TRUE |
tibble in rOstluft long format structure
input <- system.file("extdata", "smn.txt", package = "rOstluft.data", mustWork = TRUE)
read_smn(input)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.