create.signalSeries {wmtsa} | R Documentation |
Converts numeric data to an object of class containing one dimensional data. The input data is assumed to be uniformly sampled.
create.signalSeries(x=NULL, position=list(from=1,by=1,units=character()), from=NULL, by=NULL, to=NULL, length.out=NULL, units=character(), title.data=character(), documentation=character(), na.rm=TRUE)
by |
a numeric containing the sampling rate at
which the values in |
documentation |
a string used to describe the input
|
from |
a |
length.out |
an integer containing the maximum number
of values to extract from |
na.rm |
a logical flag used to indicate if NaN values should be removed from the input. Default: |
position |
a |
title.data |
a string representing the name of the input
|
to |
a numeric containing the end point
in |
units |
a string denoting the units of the time series. Default: |
x |
a numeric vector, matrix or an object of class |
an object of class signalSeries
.
## convert an explicitly developed numeric vector x <- 1:10 create.signalSeries(x) ## now impose hypothetical positions on the data create.signalSeries(x, pos=list(from=0.3, by=0.1)) ## extract the values from position 0.5 onward create.signalSeries(x, pos=list(from=0.3, by=0.1), from=0.5) ## extract the values from position 0.5 onward, ## but keep only the first 3 values of the ## extraction create.signalSeries(x, pos=list(from=0.3, by=0.1), from=0.5, length=3) ## extract the values from position 0.5 onward and ## skip every other point (sample the data at ## 0.2 position intervals) create.signalSeries(x, pos=list(from=0.3, by=0.1), from=0.5, by=0.2) ## simply return the first 4 values, and supply a ## title and some documentation comments to the ## data create.signalSeries(x, length=4, title="Faux Data", doc="An example")