print.redfit: Printing Redfit Results

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/redfit.R

Description

Print information contained in or derived from a redfit object.

Usage

1
2
3
## 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 integral value or NULL. If NULL, the value in options("digits") is used.

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 information 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.

Author(s)

Mikko Korpela

References

This function is based on the Fortran program 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(utils)
data(ca533)
tm <- time(ca533)
x <- ca533[[1]]
idx <- which(!is.na(x))
redf <- redfit(x[idx], tm[idx], "time",
               nsim = 100, iwin = 0, ofac = 1, n50 = 1)
print(redf)
fname <- tempfile(fileext=".csv")
print(fname) # tempfile used for output
print(redf, csv.out = TRUE, file = fname)
redftable <- read.csv(fname)
unlink(fname) # remove the file

dplR documentation built on May 2, 2019, 6:06 p.m.