read.FLStock {FLCore}R Documentation

Import stock data from a file

Description

This function read stock data and create an FLStock object with it. It currently supports bot "VPA" and "ADAPT" formats

Usage

read.FLStock(file, type="VPA", name, desc=paste("Imported from a", type, "file. (", file, "). ", date()), m=0.2, quant = 'age')

Arguments

file the file to import from (specify the 'index' file for VPA).
type either "VPA" or "Adapt", depending on the format of the data file.
name the name of this stock.
desc a short description of this stock.
m
quant The name of the first dimension. A character string. Defaults to "quant".

Value

An FLStock object is returned, with corresponding data

Author(s)

Laurence Kell & Philippe Grosjean

See Also

FLStock, write.FLStock

Examples

## Supposing the directory c:/mydata contains some VPA suite data, use:

# my.stock <- read.FLStock("c/mydata/index")

## to import stock data into the variable 'my.stock'

[Package FLCore version 1.1 Index]