as

0th

Percentile

timeSeries Class, Coercion and Transformation

Functions and methods dealing with the coercion of 'timeSeries' objects.

Keywords
chron
Usage
## S3 method for class 'default':
as.timeSeries(x, \dots)
## S3 method for class 'ts':
as.timeSeries(x, \dots) 
## S3 method for class 'data.frame':
as.timeSeries(x, \dots) 
## S3 method for class 'character':
as.timeSeries(x, \dots) 
## S3 method for class 'zoo':
as.timeSeries(x, \dots) 

## S3 method for class 'timeSeries': as.matrix(x, \dots) ## S3 method for class 'timeSeries': as.ts(x, \dots) ## S3 method for class 'timeSeries': as.data.frame(x, row.names = NULL, optional = FALSE, \dots) ## S3 method for class 'timeSeries': as.ts(x, \dots)

Arguments
optional
A logical value. If TRUE, setting row names and converting column names (to syntactic names) is optional.
row.names
NULL or a character vector giving the row names for the data frame. Missing values are not allowed.
x
an object which is coerced according to the generic function.
...
arguments passed to other methods.
Details

Functions to create 'timeSeries' objects from other objects: ll{ as.timeSeries Generic to convert an object to a 'timeSeries', as.timeSeries.default Returns the unchanged object, as.timeSeries.numeric Converts from a numeric vector, as.timeSseries.data.frame Converts from a numeric vector, as.timeSeries.matrix Converts from a matrix, as.timeSeries.ts Converts from an object of class 'ts', as.timeSeries.character Converts from a named demo file, as.timeSeries.zoo Converts an object of class zoo. } Functions to transform 'timeSeries' objects into other objects: ll{ as.matrix.timeSeries Coerces a 'timeSeries' to a matrix, as.data.frame.timeSeries Coerces a 'timeSeries' to a data.frame, as.ts.timeSeries S3: Coerces a 'timeSeries' to a 'ts' object. as.ts.timeSeries S3: Coerces a 'timeSeries' to a 'logical' object. }

Value

  • Function as.timeSeries returns a S4 object of class 'timeSeries'. Functions as.numeric, as.data.frame, as.matrix, as.ts return depending on the generic function a numeric vector, a data frame, a matrix, or an object of class ts.

Aliases
  • as
  • as.timeSeries
  • as.timeSeries.default
  • as.timeSeries.ts
  • as.timeSeries.data.frame
  • as.timeSeries.character
  • as.timeSeries.zoo
  • as.ts,timeSeries-method
  • as.data.frame,timeSeries-method
  • as.list,timeSeries-method
  • as.matrix,timeSeries-method
  • as.ts.timeSeries
  • as.data.frame.timeSeries
  • as.list.timeSeries
  • as.matrix.timeSeries
  • coerce,ANY,timeSeries-method
  • coerce,ts,timeSeries-method
  • coerce,data.frame,timeSeries-method
  • coerce,character,timeSeries-method
  • coerce,ANY,timeSeries-method
  • coerce,timeSeries,tse-method
  • coerce,timeSeries,data.frame-method
  • coerce,timeSeries,list-method
  • coerce,timeSeries,matrix-method
  • coerce,timeSeries,ts-method
Examples
library(timeSeries) ## Create an Artificial timeSeries Object - setRmetricsOptions(myFinCenter = "GMT") charvec <- timeCalendar() data <- matrix(rnorm(12)) TS <- timeSeries(data, charvec, units = "RAND") TS ## Coerce to Vector - as.vector(TS) ## Coerce to Matrix - as.matrix(TS) ## Coerce to Data Frame - as.data.frame(TS)
Documentation reproduced from package timeSeries, version 3022.101.2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.