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

Smooth.fv

Apply Smoothing to Function Values


Description

Applies smoothing to the values in selected columns of a function value table.

Usage

## S3 method for class 'fv'
Smooth(X, which = "*", ...,
          method=c("smooth.spline", "loess"),
          xinterval=NULL)

Arguments

X

Values to be smoothed. A function value table (object of class "fv", see fv.object).

which

Character vector identifying which columns of the table should be smoothed. Either a vector containing names of columns, or one of the wildcard strings "*" or "." explained below.

...

Extra arguments passed to smooth.spline or loess to control the smoothing.

method

Smoothing algorithm. A character string, partially matched to either "smooth.spline" or "loess".

xinterval

Optional. Numeric vector of length 2 specifying a range of x values. Smoothing will be performed only on the part of the function corresponding to this range.

Details

The command Smooth.fv applies smoothing to the function values in a function value table (object of class "fv").

Smooth.fv is a method for the generic function Smooth.

The smoothing is performed either by smooth.spline or by loess.

Smoothing is applied to every column (or to each of the selected columns) of function values in turn, using the function argument as the x coordinate and the selected column as the y coordinate. The original function values are then replaced by the corresponding smooth interpolated function values.

The optional argument which specifies which of the columns of function values in x will be smoothed. The default (indicated by the wildcard which="*") is to smooth all function values, i.e.\ all columns except the function argument. Alternatively which="." designates the subset of function values that are displayed in the default plot. Alternatively which can be a character vector containing the names of columns of x.

If the argument xinterval is given, then smoothing will be performed only in the specified range of x values.

Value

Another function value table (object of class "fv") of the same format.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

data(cells)
   G <- Gest(cells)
   plot(G)
   plot(Smooth(G, df=9), add=TRUE)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

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