Learn R Programming

dplR (version 1.5.7)

print.redfit: Printing Redfit Results

Description

Print information contained in or derived from a redfit object.

Usage

## S3 method for class 'redfit':
print(x, digits = NULL, csv.out = FALSE, do.table = FALSE,
             prefix = "", row.names = FALSE, file = "", ...)

Arguments

x
An object of class "redfit".
digits
Specifies the desired number of significant digits in the output. The argument is passed to format and print.data.frame. A positive integra
csv.out
A logical flag. If TRUE, writes a large, comma-separated table of information. The table contains one row for each frequency. If FALSE, writes a few summary numbers instead. See Details
do.table
A logical flag. If TRUE, the large information table is also printed when csv.out is FALSE, although not in a comma-separated format but with print.data.frame.
prefix
A prefix to be used on every output line except the large informaton table. REDFIT (see References) uses "# ".
row.names
A logical flag enabling or disabling automatic row names from the large information table, or a character vector of names. In any case, the table will contain frequency as the first column.
file
A writable connection or a character string naming a file. Used for setting the output destination when csv.out is TRUE. The default is to write the comma-separated table to the console.
...
Arguments to write.csv. Used when csv.out is TRUE.

Value

  • Invisibly returns x.

References

This function is based on the Fortran program http://www.ncdc.noaa.gov/paleo/softlib/redfit/redfit.html{REDFIT}, which is in the public domain.

Schulz, M. and Mudelsee, M. (2002) REDFIT: estimating red-noise spectra directly from unevenly spaced paleoclimatic time series. Computers & Geosciences, 28(3):421{--}426.

See Also

redfit

Examples

Run this code
data(ca533)
t <- as.numeric(row.names(ca533))
x <- ca533[[1]]
idx <- which(!is.na(x))
redf <- redfit(x[idx], t[idx], "time",
               nsim = 100, iwin = 0, ofac = 1, n50 = 1)
print(redf)
f <- tempfile()
print(redf, csv.out = TRUE, file = f)
redftable <- read.csv(f)

Run the code above in your browser using DataLab