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

as.fv

Convert Data To Class fv


Description

Converts data into a function table (an object of class "fv").

Usage

as.fv(x)

  ## S3 method for class 'fv'
as.fv(x)

  ## S3 method for class 'data.frame'
as.fv(x)

  ## S3 method for class 'matrix'
as.fv(x)

  ## S3 method for class 'fasp'
as.fv(x)

  ## S3 method for class 'minconfit'
as.fv(x)

  ## S3 method for class 'dppm'
as.fv(x)

  ## S3 method for class 'kppm'
as.fv(x)

  ## S3 method for class 'bw.optim'
as.fv(x)

Arguments

x

Data which will be converted into a function table

Details

This command converts data x, that could be interpreted as the values of a function, into a function value table (object of the class "fv" as described in fv.object). This object can then be plotted easily using plot.fv.

The dataset x may be any of the following:

  • an object of class "fv";

  • a matrix or data frame with at least two columns;

  • an object of class "fasp", representing an array of "fv" objects.

  • an object of class "minconfit", giving the results of a minimum contrast fit by the command mincontrast. The

  • an object of class "kppm", representing a fitted Cox or cluster point process model, obtained from the model-fitting command kppm;

  • an object of class "dppm", representing a fitted determinantal point process model, obtained from the model-fitting command dppm;

  • an object of class "bw.optim", representing an optimal choice of smoothing bandwidth by a cross-validation method, obtained from commands like bw.diggle.

The function as.fv is generic, with methods for each of the classes listed above. The behaviour is as follows:

  • If x is an object of class "fv", it is returned unchanged.

  • If x is a matrix or data frame, the first column is interpreted as the function argument, and subsequent columns are interpreted as values of the function computed by different methods.

  • If x is an object of class "fasp" representing an array of "fv" objects, these are combined into a single "fv" object.

  • If x is an object of class "minconfit", or an object of class "kppm" or "dppm", the result is a function table containing the observed summary function and the best fit summary function.

  • If x is an object of class "bw.optim", the result is a function table of the optimisation criterion as a function of the smoothing bandwidth.

Value

An object of class "fv" (see fv.object).

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

Examples

r <- seq(0, 1, length=101)
  x <- data.frame(r=r, y=r^2)
  as.fv(x)

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.