as.data.frame.drift: Coerce DRIFT-spectrum to a Data Frame

Description Usage Arguments Value See Also Examples

View source: R/drift_asdf.R

Description

A method for the as.data.frame generics specified for objects of S3-class drift. All meta tags are bound to the right of wave number columns.

Usage

1
2
## S3 method for class 'drift'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

an object of S3-class drift.

row.names

NULL or a character vector giving the valid row names for the data frame.

optional

logical. If TRUE "WN" prefix to wave numbers in column names is not added

...

(not used)

Value

an object of S3-class data.frame

See Also

Other drift: cbind.drift(), channel(), coal_drift(), diff.drift(), median.drift(), plot.drift(), read.drift(), slice(), write.drift()

Examples

1
2
3
4
5
6
7
8
9
 s <- coal_drift()

 # default usage:
 dfs <- as.data.frame(s)
 stopifnot(is.data.frame(dfs))

 # use own names for cells:
 dfsn <- as.data.frame(s, c("measurement_1", "measurement_2"))
 stopifnot(is.data.frame(dfsn))

omega1x/spectrotest documentation built on Oct. 1, 2020, 4 p.m.