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., `"vonb"`).
`suffix` | string scalar/vector specifying one or more suffixes.
`global` | logical: if `TRUE`, save the imported reports as objects to global environment using the same names as the report files.

### 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, Pacific Biological Station, Nanaimo BC, Canada

### See Also

`editADfile`, `.win.viewRep`

[Package PBSadmb version 0.61.44 Index]