Description Usage Arguments Details Value Internal parameters Author(s) See Also Examples
Allows the user to examine and reset the values of global parameters which control actions in the spatstat package.
1 2 
... 
Either empty,
or a succession of parameter names in quotes,
or a succession of 
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:
Logical flag indicating whether the functions
owin
and as.owin
should
apply very strict checks on the validity of polygon data.
These strict checks are no longer necessary, and the default is
checkpolygons=FALSE
.
See also fixpolygons
below.
Logical flag indicating whether the functions
psp
and as.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 to TRUE
.
Logical flag affecting the behaviour of the
score and pseudoscore 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).
The default expansion factor (area inflation factor)
for expansion of the simulation window in
rmh
(see rmhcontrol
).
Initialised to 2
.
Logical. Whether expressions involving polynom
in a model formula should be expanded, so that
polynom(x,2)
is replaced by x + I(x^2)
and so on.
Initialised to TRUE
.
Logical. Whether to use a fast algorithm
(introduced in spatstat 1.423) for
simulating the Poisson point process in rpoispp
when the argument lambda
is a pixel image.
Initialised to TRUE
.
Should be set to FALSE
if needed to guarantee repeatability
of results computed using earlier versions of spatstat.
Logical. Whether to use a fast C language algorithm
(introduced in spatstat 1.423) for
random thinning in rthin
when the argument
P
is a single number.
Initialised to TRUE
.
Should be set to FALSE
if needed to guarantee repeatability
of results computed using earlier versions of spatstat.
Logical. Whether to use fast or slow algorithm to compute the
(theoretical) Kfunction of a logGaussian Cox process
for use in lgcp.estK
or Kmodel
.
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 to FALSE
.
Logical flag indicating whether the functions
owin
and as.owin
should
repair errors in polygon data. For example,
selfintersecting polygons and overlapping polygons will
be repaired. The default is fixpolygons=TRUE
.
Logical value indicating whether the twodimensional
Fast Fourier Transform
should be computed using the package fftwtools,
instead of the fft
function in the stats package.
This affects the speed of density.ppp
,
density.psp
, blur
setcov
and Smooth.ppp
.
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.
The maximum value of n
for which runif(n)
will
not generate an error (possible errors include failure to allocate
sufficient memory, and integer overflow of n
).
An attempt to generate more than this number of random points
triggers a warning from runifpoint
and other
functions. Defaults to 1e6
.
Function determining the default colour map for
plot.im
. When called with one integer argument
n
, this function should return a character vector of length
n
specifying n
different colours.
Logical value, determining whether the algorithm in
Kcom
and Kres
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 at r=0.
Initialised to TRUE
.
Edge correction weights will be trimmed
so as not to exceed this value.
This applies to the weights computed by
edge.Trans
or edge.Ripley
and used in Kest
and its relatives.
The maximum permitted size (rows times columns)
of matrices generated by spatstat's internal code.
Used by ppm
and predict.ppm
(for example) to decide when to
split a large calculation into blocks.
Defaults to 2^24=16777216
.
Logical flag indicating whether graphics should be
plotted in grey scale (monochrome=TRUE
) or
in colour (monochrome=FALSE
, the default).
Integer. Number of trial values of smoothing bandwidth to use for
crossvalidation in bw.relrisk
and similar
functions.
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 the x
and y
directions respectively.
Number of points in the square grid used to compute
a discrete approximation to the areas of discs
in areaLoss
and areaGain
when exact calculation is not available.
A single integer.
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
and y
directions respectively.
Default number of voxels in a 3D image,
typically for calculating the distance transform in F3est
.
Initialised to 4 megavoxels: nvoxel = 2^22 = 4194304
.
List of arguments to be passed to the function
image
when displaying a binary image mask (in plot.owin
or plot.ppp
).
Typically used to reset the colours of foreground and background.
List of arguments controlling contour plots of pixel images
by contour.im
.
List of arguments controlling the plotting of functions
by plot.fv
and its relatives.
List of arguments to be passed to the function
persp
when displaying a realvalued image, such as the fitted surfaces
in plot.ppm
.
List of arguments controlling the plotting of point patterns
by plot.ppp
.
List of arguments controlling the plotting of threedimensional
point patterns by plot.pp3
.
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 nonPoisson models
can take a long time.
Character string determining the style of progress reports
printed by progressreport
. Either
"tty"
, "tk"
or "txtbar"
.
For explanation of these options, see progressreport
.
Logical. If TRUE
, the algorithm of
project.ppm
will be accelerated using a shorcut.
Initialised to FALSE
.
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
an n * n grid.
Initialised to 32.
Single integer,
determining the number of distances r
at which the function psstA
will be evaluated
(in the default case where argument r
is absent).
Initialised to 30.
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 at r=0.
Initialised to TRUE
.
New default values for the parameters p
, q
and nrep
in the MetropolisHastings simulation
algorithm. These override the defaults
in rmhcontrol.default
.
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 to
FALSE
. See the “Warning” section in the help for
rmh()
for more detail.
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.
Logical value indicating whether default colour maps
are allowed to include semitransparent colours, where possible.
Default is TRUE
.
Currently this only affects plot.ppp
.
The kind of parenthesis which encloses the text that
explains a unitname
. This text is seen in
the text output of functions like print.ppp
and
in the graphics generated by plot.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.
Either a list of parameters and their values, or a single value. See Details.
The following parameters may also be specified to
spatstat.options
but are intended for
software development or testing purposes.
Logical. Whether to use new version of the
code for closepairs
.
Initialised to TRUE
.
Logical. Whether to use new version of the
code for crossing.psp
.
Initialised to TRUE
.
Logical. Whether to use new version of the
code for crosspairs
.
Initialised to TRUE
.
Logical.
Indicates whether to use accelerated C code
(densityC=TRUE
) or interpreted R code (densityC=FALSE
)
to evaluate density.ppp(X, at="points")
.
Initialised to TRUE
.
Logical. Do not change this value, unless you are \adrian.
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'
.
Logical. Whether to use old R code for
morphological operations.
Initialise to FALSE
.
Logical. Whether to use new version of the
code for selfcrossing.psp
.
Initialised to TRUE
.
Logical. Whether to use new code for the
Kfunction in a rectangular window.
Initialised to TRUE
.
and \rolf
1 2 3 4 5 6 7 8 9 10 11 12 13 14  # save current values
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
spatstat.options(oldopt)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.