readRep {PBSadmb} | R Documentation |
Read an ADMB Report into R Memory
Description
Import ADMB-generated report files into R's memory using the names of the report files to name the R-objects.
Usage
readRep(prefix, suffix=c(".cor",".rep",".std",".mc.dat"), global=FALSE)
Arguments
prefix |
string name prefix of the ADMB project (e.g., |
suffix |
string scalar/vector specifying one or more suffixes. |
global |
logical: if |
Details
If the report object is one of c(".cor", ".std", ".mc.dat")
, the
report object is a data frame, otherwise it is a string vector. Multiple
report objects are returned as a list of objects. A single report object is
returned as the object itself.
This function attempts to detect the file format from a number of possibilities.
For example, if the file has the special format recognized by PBSmodelling,
then the function returns a list with named components. The example vonb
included with this package shows how to write the template to get consistent
variable names between ADMB and R. See the User's Guide for complete details.
Value
Invisibly returns the list of report objects. If only one report is imported, a single report object is returned.
Note
A wrapper function that can be called from a GUI exists as .win.readRep
.
Author(s)
Rowan Haigh, Program Head – Offshore Rockfish
Pacific Biological Station (PBS), Fisheries & Oceans Canada (DFO), Nanaimo BC
locus opus: Offsite, Vancouver BC
Last modified Rd: 2009-09-10
See Also
editADfile
, .win.viewRep