ts_load: Load time series data into a standard format array.

Description Usage Arguments Value Notes

View source: R/data_functions.R

Description

ts_load returns a standard-format data array

Usage

1
ts_load(filename = NA, header = FALSE, csv = FALSE, cols = NA)

Arguments

filename

(string) name of data file

header

(logical) if true then line 1 is a header line.

csv

(logical) does the file use commas to seperate columns?

cols

(vector) list of columns to read

Value

matrix (2D array) with three named columns named t, y, dy.

Notes

Load time series data from a multi-column ASCII file. The input data file should contain columns for t, y and dy. Here, t is the time variable, y is the variable measured and dy is its uncertainty (1-sigma error bar). If dy is not provided then it is assumed to be 0 for all data points. The output is a data frame of length N with columnes for t, y and dy. If csv is set to TRUE then the file will be read as a CSV file. If header is set to TRUE then the first line of the file is assumed to be a header (and is then ignored). The optional input cols can specify which columns contain the t, y and dy data, e.g. cols = c(2,4,5).


svdataman/gin documentation built on March 12, 2021, 7:37 a.m.