Last data update: 2014.03.03

R: Function to read a a SMET file
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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RSMET)
Loading required package: stringr
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RSMET/smet.Rd_%03d_medium.png", width=480, height=480)
> ### Name: smet
> ### Title: Function to read a a SMET file
> ### Aliases: smet
> 
> ### ** Examples
> 
> 
> file <- system.file("examples/test.smet",package="RSMET")
> sm <- smet(file)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>