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

harmonise.fv

Make Function Tables Compatible


Description

Convert several objects of class "fv" to the same values of the function argument.

Usage

## S3 method for class 'fv'
harmonise(..., strict=FALSE)

## S3 method for class 'fv'
harmonize(..., strict=FALSE)

Arguments

...

Any number of function tables (objects of class "fv").

strict

Logical. If TRUE, a column of data will be deleted if columns of the same name do not appear in every object.

Details

A function value table (object of class "fv") is essentially a data frame giving the values of a function f(x) (or several alternative estimates of this value) at equally-spaced values of the function argument x.

The command harmonise is generic. This is the method for objects of class "fv".

This command makes any number of "fv" objects compatible, in the loose sense that they have the same sequence of values of x. They can then be combined by cbind.fv, but not necessarily by eval.fv.

All arguments ... must be function value tables (objects of class "fv"). The result will be a list, of length equal to the number of arguments ..., containing new versions of each of these functions, converted to a common sequence of x values. If the arguments were named (name=value) then the return value also carries these names.

The range of x values in the resulting functions will be the intersection of the ranges of x values in the original functions. The spacing of x values in the resulting functions will be the finest (narrowest) of the spacings of the x values in the original functions. Function values are interpolated using approxfun.

If strict=TRUE, each column of data will be retained only if a column of the same name appears in all of the arguments .... This ensures that the resulting objects are strictly compatible in the sense of compatible.fv, and can be combined using eval.fv or collapse.fv.

If strict=FALSE (the default), this does not occur, and then the resulting objects are not guaranteed to be compatible in the sense of compatible.fv.

Value

A list, of length equal to the number of arguments ..., whose entries are objects of class "fv". If the arguments were named (name=value) then the return value also carries these names.

Author(s)

and Ege Rubak rubak@math.aau.dk.

See Also

Examples

H <- harmonise(K=Kest(cells), G=Gest(cells))
   H

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.