Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Examples

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

Dendrochronology Program Library in R

v1.7.2
GPL (>= 2)
Authors
Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, cph, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb], Klesse Stefan [ctb], Frank David [ctb], Visser Ronald [ctb]
Initial release
2021-01-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.