list2Dataframe function

Convert a list to a dataframe.

Convert a list to a dataframe.

Convert a list of different time series to a dataframe. Usually the list is the output of extractPeriod

NOTE: Since it's dataframe, so the dataframes in the input datalist should have the same date, if not, please use extractPeriod to process.

list2Dataframe(datalist)

Arguments

  • datalist: A list containing different time series, each sub list has to have the same length.

Returns

The converted dataframe

Examples

# open file attached in the package. file <- system.file("extdata", "testdl.txt", package = "hyfo") datalist <- dget(file) # read list file. datalist_new <- extractPeriod(datalist, commonPeriod = TRUE) dataframe <- list2Dataframe(datalist_new) # More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/

Other functions in hyfo

Related functions from the same R package

  • Maintainer: Yuanchao Xu
  • License: GPL-2
  • Last published: 2023-08-16