spatstat.options {spatstat.geom} | R Documentation |
Internal Options in Spatstat Package
Description
Allows the user to examine and reset the values of global parameters which control actions in the spatstat package.
Usage
spatstat.options(...)
reset.spatstat.options()
Arguments
... |
Either empty,
or a succession of parameter names in quotes,
or a succession of |
Details
The function spatstat.options
allows the user to examine and reset the values
of global parameters which control actions in the
spatstat package.
It is analogous to the system function options
.
The function reset.spatstat.options
resets all the
global parameters in spatstat to their original,
default values.
The global parameters of interest to the user are:
- checkpolygons
-
Logical flag indicating whether the functions
owin
andas.owin
should apply very strict checks on the validity of polygon data. These strict checks are no longer necessary, and the default ischeckpolygons=FALSE
. See alsofixpolygons
below. - checksegments
-
Logical flag indicating whether the functions
psp
andas.psp
should check the validity of line segment data (in particular, checking that the endpoints of the line segments are inside the specified window). It is advisable to leave this flag set toTRUE
. - dpp.maxmatrix
-
Integer specifying the maximum size of matrices generated by
dppeigen
. Defaults to2^24
. - eroded.intensity
-
Logical flag affecting the behaviour of the score and pseudo-score residual functions
Gcom
,Gres
Kcom
,Kres
,psstA
,psstG
,psst
. The flag indicates whether to compute intensity estimates on an eroded window (eroded.intensity=TRUE
) or on the original data window (eroded.intensity=FALSE
, the default). - expand
-
The default expansion factor (area inflation factor) for expansion of the simulation window in
rmh
(seermhcontrol
). Initialised to2
. - expand.polynom
-
Logical. Whether expressions involving
polynom
in a model formula should be expanded, so thatpolynom(x,2)
is replaced byx + I(x^2)
and so on. Initialised toTRUE
. - fastpois
-
Logical. Whether to use a fast algorithm (introduced in spatstat 1.42-3) for simulating the Poisson point process in
rpoispp
when the argumentlambda
is a pixel image. Initialised toTRUE
. Should be set toFALSE
if needed to guarantee repeatability of results computed using earlier versions of spatstat. - fastthin
-
Logical. Whether to use a fast C language algorithm (introduced in spatstat 1.42-3) for random thinning in
rthin
when the argumentP
is a single number. Initialised toTRUE
. Should be set toFALSE
if needed to guarantee repeatability of results computed using earlier versions of spatstat. - fastK.lgcp
-
Logical. Whether to use fast or slow algorithm to compute the (theoretical)
K
-function of a log-Gaussian Cox process for use inlgcp.estK
orKmodel
. The slow algorithm uses accurate numerical integration; the fast algorithm uses Simpson's Rule for numerical integration, and is about two orders of magnitude faster. Initialised toFALSE
. - fixpolygons
-
Logical flag indicating whether the functions
owin
andas.owin
should repair errors in polygon data. For example, self-intersecting polygons and overlapping polygons will be repaired. The default isfixpolygons=TRUE
. - fftw
-
Logical value indicating whether the two-dimensional Fast Fourier Transform should be computed using the package fftwtools, instead of the
fft
function in the stats package. This affects the speed ofdensity.ppp
,density.psp
,blur
setcov
andSmooth.ppp
. - gpclib
-
Defunct. This parameter was used to permit or forbid the use of the package gpclib, because of its restricted software licence. This package is no longer needed.
- huge.npoints
-
The maximum value of
n
for whichrunif(n)
will not generate an error (possible errors include failure to allocate sufficient memory, and integer overflow ofn
). An attempt to generate more than this number of random points triggers a warning fromrunifpoint
and other functions. Defaults to1e6
. - image.colfun
-
Function determining the default colour map for
plot.im
. When called with one integer argumentn
, this function should return a character vector of lengthn
specifyingn
different colours. - Kcom.remove.zeroes
-
Logical value, determining whether the algorithm in
Kcom
andKres
removes or retains the contributions to the function from pairs of points that are identical. If these are retained then the function has a jump atr=0
. Initialised toTRUE
. - maxedgewt
-
Edge correction weights will be trimmed so as not to exceed this value. This applies to the weights computed by
edge.Trans
oredge.Ripley
and used inKest
and its relatives. - maxmatrix
-
The maximum permitted size (rows times columns) of matrices generated by spatstat's internal code. Used by
ppm
andpredict.ppm
(for example) to decide when to split a large calculation into blocks. Defaults to2^24=16777216
. - monochrome
-
Logical flag indicating whether graphics should be plotted in grey scale (
monochrome=TRUE
) or in colour (monochrome=FALSE
, the default). - n.bandwidth
-
Integer. Number of trial values of smoothing bandwidth to use for cross-validation in
bw.relrisk
and similar functions. - ndummy.min
-
The minimum number of dummy points in a quadrature scheme created by
default.dummy
. Either an integer or a pair of integers giving the minimum number of dummy points in thex
andy
directions respectively. - ngrid.disc
-
Number of points in the square grid used to compute a discrete approximation to the areas of discs in
areaLoss
andareaGain
when exact calculation is not available. A single integer. - npixel
-
Default number of pixels in a binary mask or pixel image. Either an integer, or a pair of integers, giving the number of pixels in the
x
andy
directions respectively. - nvoxel
-
Default number of voxels in a 3D image, typically for calculating the distance transform in
F3est
. Initialised to 4 megavoxels:nvoxel = 2^22 = 4194304
. - par.binary
-
List of arguments to be passed to the function
image
when displaying a binary image mask (inplot.owin
orplot.ppp
). Typically used to reset the colours of foreground and background. - par.contour
-
List of arguments controlling contour plots of pixel images by
contour.im
. - par.fv
-
List of arguments controlling the plotting of functions by
plot.fv
and its relatives. - par.persp
-
List of arguments to be passed to the function
persp
when displaying a real-valued image, such as the fitted surfaces inplot.ppm
. - par.points
-
List of arguments controlling the plotting of point patterns by
plot.ppp
. - par.pp3
-
List of arguments controlling the plotting of three-dimensional point patterns by
plot.pp3
. - print.ppm.SE
-
Default rule used by
print.ppm
to decide whether to calculate and print standard errors of the estimated coefficients of the model. One of the strings"always"
,"never"
or"poisson"
(the latter indicating that standard errors will be calculated only for Poisson models). The default is"poisson"
because the calculation for non-Poisson models can take a long time. - progress
-
Character string determining the style of progress reports printed by
progressreport
. Either"tty"
,"tk"
or"txtbar"
. For explanation of these options, seeprogressreport
. - project.fast
-
Logical. If
TRUE
, the algorithm ofproject.ppm
will be accelerated using a shorcut. Initialised toFALSE
. - psstA.ngrid
-
Single integer, controlling the accuracy of the discrete approximation of areas computed in the function
psstA
. The area of a disc is approximated by counting points on ann \times n
grid. Initialised to 32. - psstA.nr
-
Single integer, determining the number of distances
r
at which the functionpsstA
will be evaluated (in the default case where argumentr
is absent). Initialised to 30. - psstG.remove.zeroes
-
Logical value, determining whether the algorithm in
psstG
removes or retains the contributions to the function from pairs of points that are identical. If these are retained then the function has a jump atr=0
. Initialised toTRUE
. - rmh.p, rmh.q, rmh.nrep
-
New default values for the parameters
p
,q
andnrep
in the Metropolis-Hastings simulation algorithm. These override the defaults inrmhcontrol.default
. - scalable
-
Logical flag indicating whether the new code in
rmh.default
which makes the results scalable (invariant to change of units) should be used. In order to recover former behaviour (so that previous results can be reproduced) set this option equal toFALSE
. See the “Warning” section in the help forrmh()
for more detail. - terse
-
Integer between 0 and 4. The level of terseness (brevity) in printed output from many functions in spatstat. Higher values mean shorter output. A rough guide is the following:
0 Full output 1 Avoid wasteful output 2 Remove space between paragraphs 3 Suppress extras such as standard errors 4 Compress text, suppress internal warnings The value of
terse
is initialised to 0. - transparent
-
Logical value indicating whether default colour maps are allowed to include semi-transparent colours, where possible. Default is
TRUE
. Currently this only affectsplot.ppp
. - units.paren
-
The kind of parenthesis which encloses the text that explains a
unitname
. This text is seen in the text output of functions likeprint.ppp
and in the graphics generated byplot.fv
. The value should be one of the character strings'('
,'['
,'{'
or''
. The default is'('
.
If no arguments are given, the current values of all parameters are returned, in a list.
If one parameter name is given, the current value of this parameter is returned (not in a list, just the value).
If several parameter names are given, the current values of these parameters are returned, in a list.
If name=value
pairs are given, the named parameters
are reset to the given values, and the previous values of
these parameters are returned, in a list.
Value
Either a list of parameters and their values, or a single value. See Details.
Internal parameters
The following parameters may also be specified to
spatstat.options
but are intended for
software development or testing purposes.
- closepairs.newcode
-
Logical. Whether to use new version of the code for
closepairs
. Initialised toTRUE
. - crossing.psp.useCall
-
Logical. Whether to use new version of the code for
crossing.psp
. Initialised toTRUE
. - crosspairs.newcode
-
Logical. Whether to use new version of the code for
crosspairs
. Initialised toTRUE
. - densityC
-
Logical. Indicates whether to use accelerated C code (
densityC=TRUE
) or interpreted R code (densityC=FALSE
) to evaluatedensity.ppp(X, at="points")
. Initialised toTRUE
. - exactdt.checks.data
-
Logical. Do not change this value, unless you are Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
- fasteval
-
One of the strings
'off'
,'on'
or'test'
determining whether to use accelerated C code to evaluate the conditional intensity of a Gibbs model. Initialised to'on'
. - old.morpho.psp
-
Logical. Whether to use old R code for morphological operations. Initialise to
FALSE
. - selfcrossing.psp.useCall
-
Logical. Whether to use new version of the code for
selfcrossing.psp
. Initialised toTRUE
. - use.Krect
-
Logical. Whether to use specialised code for the K-function in a rectangular window. Initialised to
TRUE
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
See Also
Examples
# save current values whatever they are
oldopt <- spatstat.options()
spatstat.options("npixel")
spatstat.options(npixel=150)
spatstat.options(npixel=c(100,200))
spatstat.options(par.binary=list(col=grey(c(0.5,1))))
spatstat.options(par.persp=list(theta=-30,phi=40,d=4))
# see help(persp.default) for other options
# revert to the state at the beginning of these examples
spatstat.options(oldopt)
# revert to 'factory defaults'
reset.spatstat.options()