19  function

ImportantDisclaimer

These packages (Note 1) are a one-person project undergoing rapid evolution. Backward compatibility (per Hadley Wickham) is provided as a courtesy rather than a guarantee.

Until further notice, these packages should

  • not be used as a basis for research grant applications,
  • not be cited as an actively maintained tool in a peer-reviewed manuscript,
  • not be used to support or fulfill requirements for pursuing an academic degree.

In addition, work primarily based on these packages (Note 1) should not be presented at academic conferences or similar scholarly venues.

Furthermore, a person’s ability to use these packages (Note 1) does not necessarily imply an understanding of their underlying mechanisms. Accordingly, demonstration of their use alone should not be considered sufficient evidence of expertise, nor should it be credited as a basis for academic promotion or advancement.

These statements do not apply to the contributors (Tip 1) to these packages (Note 1) with respect to their specific contributions.

These statements do not apply when the maintainer of these packages (Note 1), Tingting Zhan, is credited as the first author, the lead author, and/or the corresponding author in a peer-reviewed manuscript, or as the Principal Investigator or Co-Principal Investigator in a research grant application and/or a final research progress report.

These statements are advisory in nature and do not modify or restrict the rights granted under the GNU General Public License https://www.r-project.org/Licenses/.

The function `function` creates an R function, i.e., an R object of S3 class 'function'. Note 19.1 summarizes the S3 methods for the class 'function' in the spatstat.* family of packages,

S3 methods *.function
visible from generic isS4
as.im.function TRUE spatstat.geom spatstat.geom::as.im FALSE
as.linim.function TRUE spatstat.linnet spatstat.linnet::as.linim FALSE
clusterfield.function TRUE spatstat.random spatstat.random::clusterfield FALSE
roc.function TRUE spatstat.explore spatstat.explore::roc FALSE
TipExamples in Chapter 19 Require
library(groupedHyperframe)

19.1 Cumulative Average Vertical Height of Trapzoidal Integration

The S3 method visualize_vtrapz.function() (Section 11.3, Table 11.2)

  1. checks, in the enclosing environment of the input function \(f(x)\), for
  2. creates an \(x\)-grid using the numeric vector x (or z$x) and the number of equally spaced points with a default value of n=513L;
  3. connects the \((x, f(x))\) dots at the \(x\)-grid;
  4. scatter-plots the x (or z$x) and y (or z$y) dots.