readFCS: (Calibration Performance) Import FCS Files

Description Usage Arguments Details Value Examples

Description

Import one or more FCS files into a list.

Usage

1
2
readFCS(filepath, first.stockline = 3, stocks.key.df = NULL,
  startingyear = 1, finalyear = 9999)

Arguments

filepath

A character vector of length one. The name of the FCS file to import.

first.stockline

An integer, row number in FCS file where first stock metadata commences. See details.

stocks.key.df

A data frame. These data are stored in the package. If the argument is left with its default value (NULL), then the data are loaded from the package. The user can supply a new data frame with updated stocks, so long as the updated data frame has the same structure as found in stocks.key.

startingyear

An integer.

finalyear

An integer. The final (4 digit) year to be included from all series imported. Default is 9999, meaning all years before 9999.

Details

Need details.

Value

A list, with two elements. The first element is a data frame of all the data fro all the stocks transposed into a long format. The second element is a list comprising as many lists as stocks in the FCS file. All the data associated with each stock can be found in each sub-sub list.

Examples

1
2
3
4
5
6
7
8
## Not run: 
### read in FCS files ###
fcs.files <- list.files(data.pathname, pattern = "\\.FCS")
filename <- fcs.files[grep("OCN", x = fcs.files)]
filepath <- paste(data.pathname, filename, sep='/')
fcs.list <- readFCS(filepath)

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.