Last data update: 2014.03.03

R: Extract the fields of a 'smet-class' object
fieldsR Documentation

Extract the fields of a smet-class object

Description

The method as.smet coerces an object or a charachter string to a SMET. If the object is

fields

fields

Usage

fields(object, ...)

fields(object, ...)

## S4 method for signature 'smet'
fields(object, ...)

Arguments

object

the object

...

further arguments

Examples



df <- data.frame(a=1:6,c=1:6)
fields(df)

x <- smet(system.file('examples/PIEM001114.smet',package="RSMET"))
fields(x)





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/fields.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fields
> ### Title: Extract the fields of a 'smet-class' object
> ### Aliases: fields fields,smet-method
> 
> ### ** Examples
> 
> 
> 
> df <- data.frame(a=1:6,c=1:6)
> fields(df)
[1] "a" "c"
> 
> x <- smet(system.file('examples/PIEM001114.smet',package="RSMET"))
> fields(x)
  timestamp          VW          DW          TA          HS 
"timestamp"        "VW"        "DW"        "TA"        "HS" 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>