smet: Function to read a a SMET file

View source: R/smet-function.R

smetR Documentation

Function to read a a SMET file

Description

Function to read a a SMET file

Usage

smet(
  file = NULL,
  numeric = TRUE,
  non_numeric_fields = NULL,
  timezone.offset.sign = c("negative", "positive", "-", "+"),
  date.field = "timestamp",
  date.format = "%Y-%m-%dT%H:%M:%S",
  comment = "#",
  station.field = "station_id",
  ...
)

Arguments

file

SMET file name

numeric

logical value

non_numeric_fields

fields, except date.fiels, that contain non-numeric values

timezone.offset.sign

It can be "negative" or "positive". Many systems support timezones of the form GMT+n and GMT-n, which are at a fixed offset from UTC (hence no DST). Contrary to some usage (but consistent with names such as PST8PDT), negative offsets are times ahead of (east of) UTC, positive offsets are times behind (west of) UTC.

date.field

field neme used for date and time. Default is "timestamp".

date.format

format used for date and time. Default is "%Y-%m-%dT%H:%M:%S".

comment

character symbol used to comment lines or part of lines. Default is "#". See str_locate

station.field

field name used for station ID. Default is "station_id", as used for SMET format.

...

further arguments

Details

To better understand the use of timezones in R (tz attribute) see the following link: http://stackoverflow.com/questions/11927433/timezones-in-r-how-to-avoid-ambiguous-terms-such-as-est

Value

a smet-class object

See Also

smet-class

Examples


file <- system.file("examples/test.smet",package="RSMET")
sm <- smet(file)


ecor/RSMET documentation built on Aug. 30, 2023, 2:04 a.m.