File: Math.fasp.Rd

package info (click to toggle)
r-cran-spatstat.explore 3.7-0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,704 kB
  • sloc: ansic: 4,104; sh: 13; makefile: 5
file content (101 lines) | stat: -rw-r--r-- 2,955 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
\name{Math.fasp}
\alias{Math.fasp}
\alias{Ops.fasp}
\alias{Complex.fasp}
\alias{Summary.fasp}
\title{S3 Group Generic Methods for Function Arrays}
\description{
  These are group generic methods for objects of class \code{"fasp"}, which
  allows for usual mathematical functions and operators to be applied
  directly to function arrays. See Details for a list of implemented functions.
}
\usage{
## S3 methods for group generics have prototypes:
\special{Math(x, \dots)}
\special{Ops(e1, e2)}
\special{Complex(z)}
\special{Summary(\dots, na.rm=FALSE, drop=TRUE)}
%NAMESPACE S3method("Math", "fasp")
%NAMESPACE S3method("Ops", "fasp")
%NAMESPACE S3method("Complex", "fasp")
%NAMESPACE S3method("Summary", "fasp")
}
\arguments{
  \item{x, z, e1, e2}{objects of class \code{"fasp"}.}
  \item{\dots}{further arguments passed to methods.}
  \item{na.rm}{
    Logical value specifying whether missing values
    should be removed. 
  }
}
\details{
  Below is a list of mathematical functions and operators which are
  defined for objects of class \code{"fasp"}.
  The methods are implemented using \code{\link{eval.fasp}}, which tries
  to harmonise the functions via \code{\link{harmonise.fv}} if they aren't
  compatible to begin with.

  \enumerate{
    \item Group \code{"Math"}:
    \itemize{
      \item
      \code{abs}, \code{sign}, \code{sqrt},\cr
      \code{floor}, \code{ceiling}, \code{trunc},\cr
      \code{round}, \code{signif}

      \item
      \code{exp}, \code{log},  \code{expm1}, \code{log1p},\cr
      \code{cos}, \code{sin}, \code{tan},\cr
      \code{cospi}, \code{sinpi}, \code{tanpi},\cr
      \code{acos}, \code{asin}, \code{atan}

      \code{cosh}, \code{sinh}, \code{tanh},\cr
      \code{acosh}, \code{asinh}, \code{atanh}

      \item
      \code{lgamma}, \code{gamma}, \code{digamma}, \code{trigamma}
      \item \code{cumsum}, \code{cumprod}, \code{cummax}, \code{cummin}
    }

    \item Group \code{"Ops"}:
    \itemize{
      \item
      \code{"+"}, \code{"-"}, \code{"*"}, \code{"/"},
      \code{"^"}, \code{"\%\%"}, \code{"\%/\%"}

      \item \code{"&"}, \code{"|"}, \code{"!"}

      \item \code{"=="}, \code{"!="},
      \code{"<"}, \code{"<="}, \code{">="}, \code{">"}
    }

    \item Group \code{"Summary"}:
    \itemize{
      \item \code{all}, \code{any}
      \item \code{sum}, \code{prod}
      \item \code{min}, \code{max}
      \item \code{range}
    }

    \item Group \code{"Complex"}:
    \itemize{
      \item \code{Arg}, \code{Conj}, \code{Im}, \code{Mod}, \code{Re}
    }
  }

  For the \code{Ops} group, one of the arguments is permitted to be
  a single atomic value, or a function table, instead of a function array.
}
\seealso{
  \code{\link{eval.fasp}} for evaluating expressions involving function arrays.
}
\examples{
  ## convert array of K functions to array of L functions
  K <- alltypes(amacrine, "K")
  L <- sqrt(K/pi)
}
\author{
  \spatstatAuthors.
}
\keyword{spatial}
\keyword{methods}