
        CHANGES IN spatstat VERSION 1.48-0

OVERVIEW

    o We thank Kim Colyvas, Yongtao Guan, Gopalan Nair, 
    Nader Najari, Suman Rakshit, Ian Renner and Hangsheng Wang 
    for contributions.

    o Sufficient Dimension Reduction for point processes.

    o Alternating Gibbs Sampler for point process simulation.

    o Intensity approximation for area-interaction and Geyer models.

    o New class of spatially sampled functions.

    o ROC and AUC extended to other types of point patterns and models.

    o More support for linear networks.

    o More support for infinite straight lines.

    o Simulation of 'rhohat' objects.

    o Kernel smoothing accelerated.

    o Methods for 'head' and 'tail' for spatial patterns.

    o More low-level functionality.

    o Improvements and bug fixes.

    o spatstat now has more than 1000 help files.

    o Nickname: 'Model Prisoner'

NEW CLASSES

    o ssf
    Class of spatially sampled functions.

NEW FUNCTIONS

    o sdr, dimhat
    Sufficient Dimension Reduction for point processes.
    Matlab code contributed by Yongtao Guan, translated by Suman Rakshit.

    o rags, ragsAreaInter, ragsMultiHard
    Alternating Gibbs Sampler for point processes.

    o psib
    Sibling probability (index of clustering strength in a cluster process).

    o bugfixes    
    List all bug fixes in recent versions of a package.

    o roc.kppm, roc.lppm, roc.lpp
    Methods for 'roc' (receiver operating characteristic curve)
    for fitted models of class 'kppm' and 'lppm'
    and point patterns of class 'lpp'

    o auc.kppm, auc.lppm, auc.lpp
    Methods for 'auc' (area under the ROC curve)
    for fitted models of class 'kppm' and 'lppm'
    and point patterns of class 'lpp'

    o rlpp
    Random points on a linear network with a specified probability density.

    o cut.lpp
    Method for 'cut' for point patterns on a linear network.

    o crossing.linnet
    Find crossing points between a linear network and another set of lines.

    o ssf
    Create a spatially sampled function

    o print.ssf, plot.ssf, contour.ssf, image.ssf
    Display a spatially sampled function

    o as.im.ssf, as.ppp.ssf, marks.ssf, marks<-.ssf, unmark.ssf, [.ssf, with.ssf
    Manipulate data in a spatially sampled function

    o Smooth.ssf
    Smooth a spatially sampled function 

    o integral.ssf
    Approximate integral of spatially sampled function

    o simulate.rhohat
    Generate a Poisson random point pattern with intensity that is
    a function of a covariate, given by a 'rhohat' object.

    o head.ppp, head.ppx, head.psp, head.tess, 
    tail.ppp, tail.ppx, tail.psp, tail.tess
    Methods for 'head' and 'tail' for spatial patterns.

    o as.data.frame.tess
    Convert a tessellation to a data frame.

    o timeTaken
    Extract the timing data from a 'timed' object or objects.

    o rotate.infline, shift.infline, reflect.infline, flipxy.infline
    Geometrical transformations for infinite straight lines.

    o whichhalfplane
    Determine which side of an infinite line a point lies on.

    o points.lpp
    Method for 'points' for point patterns on a linear network.

    o pairs.linim
    Pairs plot for images on a linear network.

    o has.close
    Faster way to check whether a point has a close neighbour.

    o closetriples
    Low-level function to find all close triples of points.

    o matrixpower, matrixsqrt, matrixinvsqrt
    Raise a matrix to any power.

SIGNIFICANT USER-VISIBLE CHANGES

    o intensity.ppm
    Intensity approximation is now available for the Geyer saturation process
    and the area-interaction process (results of research with Gopalan Nair).

    o envelope.lpp, envelope.lppm
    New arguments 'fix.n' and 'fix.marks' allow envelopes to be computed
    using simulations conditional on the observed number of points.

    o "[.im"
    The subset index "i" can now be a linear network (object of class 'linnet').
    The result of "x[i, drop=FALSE]" is then a pixel image of class 'linim'.

    o cut.ppp
    Argument z can be "x" or "y" indicating one of the spatial coordinates.

    o rThomas, rMatClust, rCauchy, rVarGamma, rPoissonCluster, rNeymanScott
    New argument 'saveparents'.

    o lintess
    Argument 'df' can be missing or NULL, 
    resulting in a tesellation with only one tile.

    o lpp
    X can be missing or NULL, resulting in an empty point pattern.

    o plot.lintess
    Improved plot method, with more options.

    o rpoisline
    Also returns information about the original infinite random lines.

    o density.ppp, Smooth.ppp
    Accelerated.

    o density.psp
    New argument 'method' controls the method of computation.
    New faster option 'method="FFT"'    

    o nndist.lpp
    Accelerated.

BUG FIXES

    o F3est
    Estimates of F(r) for the largest value of r were wildly incorrect.
    Fixed.

    o clip.infline
    Results were incorrect unless the midpoint of the window
    was the coordinate origin.
    Fixed.

    o integral.linim
    Results were inaccurate if many of the segment lengths were 
    shorter than the width of a pixel.
    Fixed.

    o predict.lppm
    Bizarre error messages about 'class too long' or 'names too long'
    occurred if the model was multitype.
    Fixed.

    o superimpose
    Point patterns containing 0 points were ignored
    when determining the list of possible marks.
    Fixed.

    o chop.tess
    Vertical lines were not handled correctly 
    with pixellated tessellations.
    Fixed.

    o timed
    Argument 'timetaken' was ignored.
    Fixed.    

    o ppm
    Crashed if method="logi" and the 'covariates' were a data frame.
    [Spotted by Kim Colyvas and Ian Renner.]
    Fixed.

    o rpoislpp, runiflpp
    Crashed if nsim > 1.
    Fixed.

    o rpoisline
    Crashed if zero lines were generated.
    Fixed.

    o model.frame.ppm
    Crashed if the original model was fitted to a data frame of covariates
    and there were NA's amongst the covariate values.
    [Spotted by Kim Colyvas.]
    Fixed.

    o any, all
    When applied to pixel images (objects of class 'im') the result 
    was sometimes NA when a finite value should have been returned.
    Fixed.    
   
    o predict.rhohat
    When the original data were on a linear network,
    the result of predict.rhohat did not belong to the correct class 'linim'.
    Fixed.
 
        CHANGES IN spatstat VERSION 1.47-0

OVERVIEW

    o We thank Marcel Austenfeld, Guy Bayegnak, Tilman Davies, Cenk Icos, 
    Jorge Mateu, Frederico Mestre, Mehdi Moradi, Virginia Morera Pujol,
    Suman Rakshit and Sven Wagner for contributions.

    o Non-Gaussian smoothing kernels.

    o Important bug fix in linearK, linearpcf

    o Changed internal format of linnet and lpp objects.

    o Faster computation in linear networks.

    o Bias correction techniques.

    o Bounding circle of a spatial object.

    o Minkowski sum also applicable to point patterns and line segment patterns.

    o Option to plot marked points as arrows.

    o Kernel smoothing accelerated.

    o Workaround for bug in some graphics drivers affecting image orientation.

    o Bug fixes and improvements.

    o Version nickname: 'Responsible Gambler'

NEW FUNCTIONS

    o anyNA.im
    Method for 'anyNA' for pixel images.

    o bc
    Bias correction (Newton-Raphson) for fitted model parameters. 
    See also 'rex'.

    o boundingcircle, boundingcentre
    Find the smallest circle enclosing a window or point pattern.

    o "[.linim"
    Subset operator for pixel images on a linear network.

    o mean.linim, median.linim, quantile.linim
    The mean, median, or quantiles of pixel values in a 
    pixel image on a linear network.

    o rex
    Richardson extrapolation for numerical integrals and 
    statistical model parameter estimates. 

    o weighted.median, weighted.quantile
    Median or quantile of numerical data with associated weights.

SIGNIFICANT USER-VISIBLE CHANGES

    o linear networks
    The internal format of a 'linnet' (linear network) object
    has been changed. Existing datasets of class 'linnet' and 'lpp'
    are still supported. However, computation will be faster if they
    are converted to the new format. To convert a linnet object L
    to the new format, use L <- as.linnet(L). To convert an lpp object X 
    to the new format, use X <- as.lpp(X).

    o density.ppp, Smooth.ppp
    New argument 'kernel' allows the user to specify the smoothing kernel.

    o density.ppp, Smooth.ppp
    Argument 'weights' can now be a pixel image.

    o MinkowskiSum, %(+)%
    Now accepts arguments which are point patterns or line segment patterns
    as well as windows.

    o plot.im
    New argument 'workaround' to avoid a bug in some device drivers
    that causes the image to be displayed in the wrong spatial orientation.
    [Thanks to Marcel Austenfeld for drawing attention to this.]

    o sumouter
    New argument 'y' allows computation of asymmetric outer products.

    o linearKinhom, linearpcfinhom
    New argument 'normpower'.

    o rmh.default, rmh.ppm
    New arguments 'nsim', 'saveinfo'.

    o symbolmap, plot.ppp, plot.lpp
    New option: shape="arrows" 

    o rcellnumber
    New argument 'mu'.

    o lengths.psp
    New argument 'squared'.

    o plot.linfun
    Now passes arguments to the function being plotted.

    o as.linnet.psp
    If the line segment pattern has marks, then the resulting linear network
    also carries these marks in the $lines component.

    o summary.owin, summary.im
    The fraction of frame area that is occupied by the window/image
    is now reported.

    o density.ppp, Smooth.ppp
    Computation accelerated by about 15% 
    in the case where at='points' and kernel='gaussian'.

    o linearK, linearpcf
    Accelerated by about 40%.

    o pixellate.ppp
    Accelerated in the case where weights are given

    o density.ppp
    Accelerated in the cases where weights are given or 'diggle=TRUE'
    
    o dilation.ppp
    Improved geometrical accuracy.
    Now accepts arguments to control resolution of polygonal approximation.

    o discs
    New argument 'npoly'. 
    Accelerated in some cases. 

    o plot.pp3
    New arguments 'box.front', 'box.back' control plotting of the box.

    o grow.rectangle
    New argument 'fraction'.

    o nnfun.lpp
    New argument 'k'.

    o bw.ppl
    New argument 'sigma'.

    o lppm
    New argument 'random' controls placement of dummy points.

    o rhohat.lpp
    New argument 'random' controls placement of dummy points.

    o quadrat.test.ppm
    Accelerated in the case where the original window is a rectangle.

    o kppm, mincontrast, cauchy.estpcf, lgcp.estpcf, matclust.estpcf,
    thomas.estpcf, vargamma.estpcf
    A warning about infinite values of the summary function 
    no longer occurs when the default settings are used.

    o circumradius
    This function is now deprecated, in favour of 'boundingradius'

    o print.quad
    More information is printed.

BUG FIXES

    o linearK, linearpcf, and relatives:
    These functions were sometimes greatly underestimated
    when the network had segments shorter than 10 coordinate units.
    [Bug introduced in spatstat 1.44-0, december 2015.]
    Fixed.

    o integral.linim, integral.linfun
    Results were slightly inaccurate because of a bias in the
    distribution of sample points.
    [Bug introduced in spatstat 1.41-0, february 2015.]
    Fixed.

    o intensity.ppm
    Result was incorrect for Gibbs models if the model was *exactly* 
    equivalent to a Poisson process (i.e. if all interaction
    coefficients were exactly zero).
    [Bug introduced in spatstat 1.28-1, june 2012.]
    Fixed.

    o rSSI
    Sometimes terminated prematurely.
    [Spotted by Frederico Mestre.]
    Fixed.

    o perspPoints
    Crashed if the image Z contained NA 
    (i.e. if Z was only defined on a subset of the bounding frame).
    Spotted by Guy Bayegnak.
    Fixed.

    o plot.ppp, plot.lpp
    Crashed if the argument 'shape' was given.
    Fixed.

    o plot.kppm
    Crashed if the model was not fitted by minimum contrast.
    Fixed.

    o superimpose
    Crashed if the argument was a 'solist' containing line segment patterns.
    Fixed.

    o Jest
    Crashed sometimes, depending on the shape of the observation window.
    [Spotted by Cenk Icos.]
    Fixed.

    o plot.studpermutest
    Crashed when the summary statistic was a multitype pair correlation 
    function or multitype K function. [Spotted by Sven Wagner.]
    Fixed.

    o pool.anylist
    Crashed with a message about buffer size,
    if the list was longer than about 100 items.
    Fixed.

    o diagnose.ppm, plot.diagppm
    Crashed in some cases when cumulative=FALSE.
    Fixed.

    o leverage.ppm, influence.ppm, dfbetas.ppm
    Crashed sometimes with a message about wrong replacement length.
    [Spotted by Virginia Morera Pujol.]
    Fixed.

    o as.linnet.psp
    Crashed with marked segment patterns, if any segments were very short.
    [Spotted by Suman Rakshit.]
    Fixed.

    o stieltjes
    Returned NA if some values of f were not finite.
    Fixed.

    o plot.symbolmap
    If a new plot window was initialised, it was sometimes too small
    to contain the geometric figures (circles, squares etc) in the symbol map.
    Fixed.

    o plot.ppp, plot.im
    Ignored xlim, ylim. 
    Fixed.

    o rhohat.lpp
    Ignored nd, eps.
    Fixed.

    o nnfun.lpp
    Print method gave incorrect information about the point pattern.
    Fixed.

    o "[.fv"
    The default plot formula was not updated.
    Fixed.

    o fitted.ppm
    The result was sometimes a 1-dimensional array rather than a numeric vector.
    Fixed.

        CHANGES IN spatstat VERSION 1.46-1

OVERVIEW

    o Important bug fix.

    o Version nickname: 'Spoiler Alert'

BUG FIXES

    o density.ppp, Smooth.ppp
    The results of density(X, at="points") and Smooth(X, at="points")
    were incorrect in some cases. The contribution from the 
    left-most data point (the point with the smallest x coordinate) 
    was omitted.   [Bug introduced in spatstat 1.26-0, April 2012.]
    Fixed.

        CHANGES IN spatstat VERSION 1.46-0

OVERVIEW

    o We thank Corey Anderson and Sebastian Meyer for contributions.

    o spatstat now depends on R 3.3.0 or later.

    o Improvements to inhomogeneous multitype K and L functions.

    o Variance approximation for pair correlation function.

    o Leverage and influence for multitype point process models.

    o Functions for extracting components of vector-valued objects.

    o Important bug fix in Smooth.ppp

    o Minor improvements and bug fixes.

    o Version nickname: 'Multidimensional Toothbrush'

NEW FUNCTIONS

    o split.msr
    Decompose a measure into parts.

    o unstack.msr
    Decompose a vector-valued measure into its component measures.

    o unstack.ppp, unstack.psp, unstack.lpp
    Given a spatial pattern with several columns of marks,
    separate the columns and return a list of spatial patterns, 
    each having only one column of marks.

    o kernel.squint
    Integral of squared kernel, for the kernels used in density estimation.

SIGNIFICANT USER-VISIBLE CHANGES

    o Kcross.inhom, Kdot.inhom, Kmulti.inhom, Ldot.inhom, Lcross.inhom
    These functions now allow intensity values to be given by
    a fitted point process model.
    New arguments 'update', 'leaveoneout', 'lambdaX'.

    o diagnose.ppm
    Infinite values of 'rbord' are now ignored and treated as zero.
    This ensures that diagnose.ppm has a sensible default
    when the fitted model has infinite reach.

    o pcf.ppp
    Now calculates an analytic approximation to the variance of
    the estimate of the pair correlation function (when var.approx=TRUE).
    Now returns the smoothing bandwidth used, as an attribute of the result.
    
    o plot.ppp
    When 'clipwin' is given, any parts of the boundary of the window of x
    that lie inside 'clipwin' will also be plotted.

    o plot.msr
    Now handles multitype measures.
    New argument 'multiplot'.

    o plot.anylist
    If a list entry x[[i]] belongs to class 'anylist', it will be expanded
    so that each entry x[[i]][[j]] will be plotted as a separate panel.

    o influence.ppm, leverage.ppm
    These can now be applied to multitype point process models
    and the results can be plotted.

    o plot.influence.ppm, plot.leverage.ppm
    New argument 'multiplot'.

    o plot.anylist, plot.solist, plot.listof
    New arguments panel.begin.args, panel.end.args

    o influence.ppm, leverage.ppm, dfbetas.ppm
    For Gibbs models, memory usage has been dramatically reduced, 
    so the code can handle larger datasets and finer quadrature schemes.

BUG FIXES

    o Smooth.ppp
    Results were incorrect when at='points' and leaveoneout=FALSE.
    [Bug introduced in spatstat 1.20-5, October 2010.]
    Fixed.

    o funxy
    Did not correctly handle one-line functions:
    the resulting objects evaluated the wrong function in some cases.
    [Spotted by Sebastian Meyer. Bug introduced in spatstat 1.45-0]
    Fixed.

    o mppm
    Did not recognise the variable 'marks' in a formula.
    Fixed.

    o Smooth.ppp, bw.smoothppp
    Crashed if X had two columns of marks and one column was constant.
    [Bug introduced in spatstat 1.38-0, October 2014]
    Fixed.

    o Smooth.ppp
    Results for 'at="points"' were garbled, for some values of 'sigma',
    if X had more than one column of marks.
    [Bug introduced in spatstat 1.38-0, October 2014]
    Fixed.

    o plot.layered
    Crashed if one layer was a point pattern with several columns of marks.
    Fixed. 

    o plot.ppm
    Sometimes gave a spurious warning about a singular matrix.
    Fixed.

    o setminus.owin
    Gave wrong or strange answer if the correct answer was empty.
    Fixed.

    o parameters.dppm
    Crashed, due to a typo.
    Fixed.

    o progressreport
    Crashed if n = 1. 
    Fixed.

        CHANGES IN spatstat VERSION 1.45-2

OVERVIEW

    o We thank Ottmar Cronie, Virginia Morera Pujol,
    Sven Wagner and Marie-Colette van Lieshout for contributions.

    o Recursive-partition point process models.

    o Minkowski sum, morphological dilation and erosion with any shape.

    o Important bug fix in spatial CDF tests.

    o More bug fixes for replicated patterns.

    o Simulate a model fitted to replicated point patterns.

    o Inhomogeneous multitype F and G functions.

    o Summary functions recognise correction="all"

    o Leverage and influence code handles bigger datasets.

    o More support for pixel images.

    o Improved progress reports.

    o New dataset 'redwood3'

    o spatstat now Depends on the package 'rpart'

    o Version nickname: 'Caretaker Mode'

NEW DATASETS

    o redwood3
    A more accurate version of the 'redwood' data.

NEW FUNCTIONS

    o as.im.data.frame
    Build a pixel image from a data frame of coordinates and pixel values.

    o covering
    Cover a window using discs of a given radius.

    o dilationAny, erosionAny, %(-)%
    Morphological dilation and erosion by any shape.

    o FmultiInhom, GmultiInhom
    Inhomogeneous multitype/marked versions of the summary functions Fest, Gest.

    o kernel.moment
    Moment or incomplete moment of smoothing kernel.

    o MinkowskiSum, %(+)%
    Minkowski sum of two windows: A %(+)% B, or MinkowskiSum(A,B)

    o nobjects
    New generic function for counting the number of 'things' in a dataset.
    There are methods for ppp, ppx, psp, tess.

    o parameters.interact, parameters.fii
    Extract parameters from interpoint interactions.
    [These existing functions are now documented.]

    o ppmInfluence
    Calculate leverage.ppm, influence.ppm and dfbetas.ppm efficiently.

    o rppm, plot.rppm, predict.rppm, prune.rppm
    Recursive-partition point process models

    o simulate.mppm
    Simulate a point process model fitted to replicated point patterns.

    o update.interact
    Update the parameters of an interpoint interaction.
    [This existing function is now documented.]

    o where.max, where.min
    Find the spatial location(s) where a pixel image achieves its
    maximum or minimum value.

SIGNIFICANT USER-VISIBLE CHANGES

    o cdf.test.mppm
    Now handles Gibbs models.
    Now recognises covariate="x" or "y".

    o leverage.ppm, influence.ppm, dfbetas.ppm
    For Gibbs models, memory usage has been dramatically reduced, 
    so the code can handle larger datasets and finer quadrature schemes.

    o plot.im
    Now handles complex-valued images.

    o connected.im
    Now handles a logical-valued image properly.

    o qqplot.ppm
    Argument 'expr' can now be a list of point patterns,
    or an envelope object containing a list of point patterns.

    o as.layered
    Default method now handles a (vanilla) list of spatial objects.

    o summary functions
    The argument 'correction="all"' is now recognised: it selects
    all the available options. 
        This applies to Fest, F3est, Gest, Gcross, Gdot, Gmulti, G3est, Gfox,
    	Gcom, Gres, Hest, Jest, Jmulti, Jcross, Jdot, Jfox,
	Kest, Kinhom, Kmulti, Kcross, Kdot, Kcom, Kres, 
	Kmulti.inhom, Kcross.inhom, Kdot.inhom, Kscaled, Ksector, Kmark, 
	K3est, Lscaled, markcorr, markcrosscorr,
	nnorient, pairorient, pcfinhom, pcfcross.inhom, pcfcross, pcf, Tstat.

    o clarkevans
    The argument 'correction="all"' is now recognised: it selects
    all the available options. [This is also the default.]

    o predict.mppm
    The argument 'type="all"' is now recognised: it selects
    all the available options. [This is also the default.]

    o plot.kppm
    The argument 'what="all"' is now recognised: it selects
    all the available options. [This is also the default.]

    o connected.im, connected.owin
    Arguments '...' now determine pixel resolution.

    o anova.mppm
    New argument 'fine'

    o as.owin.data.frame
    New argument 'step'

    o discs
    Now accepts a single numeric value for 'radii'.

    o plot.ppp, plot.profilepl, plot.quadratcount, plot.quadrattest, plot.tess
    Now recognise graphics parameters for text, such as 'family' and 'srt'

    o as.function.tess
    New argument 'values' specifies the function values.

    o cdf.test
    Calculations are more robust against numerical rounding effects.

    o progressreport
    Behaviour improved. New arguments 'tick', 'showtime'.

    o simulate.ppm
    New argument 'verbose'

    o compileK, compilepcf
    These internal functions are now documented.

BUG FIXES

    o cdf.test.ppm
    Calculation of p-values was incorrect for Gibbs models: 
    1-p was computed instead of p.
    [Spotted by Sven Wagner.]
    Fixed.

    o subfits
    The interaction coefficients of the submodels were incorrect
    for Gibbs models with a multitype interaction (MultiStrauss, etc).
    [Spotted by Sven Wagner.]
    Fixed.

    o subfits
    Crashed when a Gibbs model included factor-valued spatial covariates
    and not all levels of the factor were present in each row of the data.
    [Spotted by Sven Wagner.]
    Fixed.

    o subfits
    For Gibbs models with a multitype interaction (MultiStrauss, etc),
    computation of the conditional intensity caused an error.
    [Spotted by Sven Wagner.]
    Fixed.

    o diagnose.ppm
    Crashed if what="smooth", when the original window was a rectangle.
    [Spotted by Virginia Morera Pujol.]
    Fixed.

    o mppm
    The x and y coordinates were not permitted in the 
    random-effects formula 'random'.
    [Spotted by Sven Wagner.]
    Fixed.

    o vcov.ppm
    The result had no 'dimnames', if the model was fitted using method="ho".
    Fixed.

        CHANGES IN spatstat VERSION 1.45-1

OVERVIEW

    o This version was never released.

        CHANGES IN spatstat VERSION 1.45-0

OVERVIEW

    o We thank Monsuru Adepeju, Mario D'Antuono, Markus Herrmann, 
    Paul Hewson, Kassel Hingee, Greg McSwiggan, Suman Rakshit and Sven Wagner 
    for contributions.

    o Important bug fix in leverage/influence diagnostics for Gibbs models.

    o Numerous bug fixes in code for replicated point patterns.

    o Surgery on linear networks.

    o Tessellations on a linear network.

    o Laslett's Transform.

    o Colour maps for point patterns with continuous marks are easier to define.

    o Pair correlation function estimates can be pooled.

    o Stipulate a particular version of a package.

    o Fixed namespace problems arising when spatstat is not loaded.

    o Bug fixes and performance improvements.

    o spatstat now contains 100,000 lines of R code. 

    o Version nickname: 'One Lakh'

NEW FUNCTIONS

    o laslett
    Laslett's Transform.
    [Thanks to Kassel Hingee]

    o lintess
    Tessellation on a linear network.

    o divide.linnet 
    Divide a linear network into pieces demarcated by a point pattern.

    o insertVertices
    Insert new vertices in a linear network.

    o thinNetwork
    Remove vertices and/or segments from a linear network etc

    o connected.linnet
    Find connected components of a linear network.

    o nvertices, nvertices.linnet, nvertices.owin
    Count the number of vertices in a linear network 
    or vertices of the boundary of a window.

    o as.data.frame.linim, as.data.frame.linfun
    Extract a data frame of spatial locations and function values
    from an object of class 'linim' or 'linfun'.

    o as.linfun, as.linfun.linim, as.linfun.lintess
    Convert other kinds of data to a 'linfun' object.

    o requireversion
    Require a particular version of a package
    (for use in stand-alone R scripts).

SIGNIFICANT USER-VISIBLE CHANGES

    o [.linnet, [.lpp
    New argument 'snip' determines what to do with segments of the network
    that cross the boundary of the window. 
    Default behaviour has changed.

    o pcfinhom
    Default behaviour is changed when 'lambda' is a fitted model.
    The default is now to re-fit the model to the data before computing pcf.
    New arguments 'update' and 'leaveoneout' control this.

    o envelope methods
    New argument 'funYargs' contains arguments to the summary function
    when applied to the data pattern only.

    o plot.ppp, plot.lpp
    For a point pattern with continuous marks ('real numbers')
    the colour arguments 'cols', 'fg', 'bg' can now be vectors of 
    colour values, and will be used to determine the default colour map
    for the marks.

    o symbolmap
    Now accepts a vector of colour values for the arguments 'col', 'cols',
    'fg', 'bg' if argument 'range' is given.

    o closepairs.ppp, closepairs.pp3
    New arguments 'distinct' and 'neat' allow more options.

    o closepairs.ppp, closepairs.pp3
    Argument 'ordered' has been replaced by 'twice'
    (but 'ordered' is still accepted, with a warning).

    o closepairs.ppp, closepairs.pp3
    Performance improved (computation time and memory requirements reduced.)
    This should improve the performance of many functions in spatstat.

    o Geyer
    The saturation parameter 'sat' can now be less than 1.

    o lpp, as.lpp
    These functions now handle the case where 'seg' and 'tp' are given
    but 'x' and 'y' are missing.

    o linnet
    If the argument 'edges' is given, then this argument now determines the
    ordering of the sequence of line segments. For example, the i-th row
    of 'edges' specifies the i-th line segment in as.psp(L).

    o funxy, distfun
    The functions created by funxy and distfun have arguments (x,y).
    The user may now give a ppp or lpp object for the argument 'x',
    instead of giving two coordinate vectors 'x' and 'y'.

    o crossing.psp
    New argument 'details' gives more information about the intersections
    between the segments.

    o subset.ppp, subset.lpp, subset.pp3, subset.ppx
    The argument 'subset' can now be any argument acceptable to the "[" method.
    
    o density.lpp
    New argument 'weights'.

    o pcf.ppp
    New argument 'ratio' allows several estimates of pcf to be pooled.

    o summary.ppm
    New argument 'fine' selects the algorithm for variance estimation.

    o texturemap
    Argument 'textures' can be missing or NULL.

    o plot.lpp
    New argument 'show.network'

    o linnet
    New argument 'warn'

    o mppm
    Performs more checks for consistency of the input data.
    
    o mppm
    New arguments 'gcontrol' and 'reltol.pql' control the fitting algorithm.

    o edge.Trans
    New argument 'gW' for efficiency.

    o pool.fv
    The default plot of the pooled function no longer includes 
    the variance curves.

    o clickpoly
    The polygon is now drawn progressively as the user clicks new vertices.
    
    o Kest 
    Accelerated computation (for translation and rigid corrections)
    when window is an irregular shape.

    o vcov.ppm, leverage.ppm, influence.ppm, dfbetas.ppm
    Performance slightly improved, for Gibbs models.

    o Internal code
    Performance slightly improved.

    o Fest, Hest
    Additional checks for errors in input data.

BUGS

   o leverage.ppm, influence.ppm, parres.ppm, addvar.ppm
   Calculations were completely incorrect for Gibbs models, 
   due to a coding error. 
   Fixed.

   o update.kppm
   If the call to 'update' did not include a formula argument
   or a point pattern argument, then all arguments were ignored. 
   Example: update(fit, improve.type="quasi") was identical to 'fit'.
   Fixed.

   o diagnose.ppm
   When applied to a model obtained from subfits(), 
   in the default case (oldstyle=FALSE) 
   the variance calculations were incorrect.
   Consequently the dotted lines representing significance bands were 
   incorrect. An error or warning about negative variances occurred sometimes.
   However, calculations with oldstyle=TRUE were correct.
   The default has now been changed to oldstyle=TRUE for such models.

   o [.lpp
   The local coordinate 'seg' was completely incorrect,
   when 'i' was a window.
   Fixed.

   o leverage.ppm, influence.ppm, parres.ppm, addvar.ppm
   Crashed for Gibbs models in which the coefficient vector had length 1,
   such as the stationary Hardcore model.
   Fixed.

   o subfits
   Crashed if the model included factor-valued spatial covariates.
   [Spotted by Sven Wagner]
   Fixed.

   o subfits
   If the model included factor-valued spatial covariates, and if
   not all levels of the factor were present in each row of the data,
   the resulting objects were malformed and caused errors in other code.
   [Spotted by Sven Wagner]
   Fixed.

   o subfits
   Crashed with some random-effects formulas.
   [Spotted by Sven Wagner]
   Fixed.

   o improve.kppm
   An error message about a missing object 'gminus1' occurred
   when vcov=TRUE, fast.vcov=FALSE and type="clik1" or "wclik1".
   Fixed.

   o plot.profilepl
   Failed with a message about a missing object 'finite'.
   Fixed.

   o selfcut.psp
   Gave an error if marks(A) was a vector rather than a data frame.
   [Spotted by Paul Hewson.]
   Fixed.

   o suffstat
   Gave an error for point process models with Geyer interaction.
   Fixed.

   o nncross.lpp, distfun.lpp
   Crashed with obscure errors if Y consisted of a single point.
   Fixed.

   o scan.test, scanmeasure
   Crashed sometimes with an error message from 'grow.mask'.
   Fixed.

   o dppm
   Crashed sometimes with a message that the point pattern could not be found.
   [Scoping bug.]
   Fixed.

   o mppm, profilepl
   Crashed, with a message about 'SpatstatVersion',
   if the 'spatstat' package was neither loaded nor attached.
   [Spotted by Markus Herrmann.]
   Fixed.

   o qqplot.ppm
   Crashed sometimes when applied to a model obtained from subfits().
   Fixed.

   o anova.mppm
   Crashed sometimes with a message about mismatched coefficients.
   [Spotted by Sven Wagner.]
   Fixed.

   o anova.mppm
   Crashed sometimes with a message about unrecognised option 'type="score"'.
   [Spotted by Sven Wagner.]
   Fixed.

   o split.ppx
   Crashed if 'f' was not a factor.
   Fixed.

   o idw
   The result was a pixel image defined in the rectangle Frame(X)
   instead of Window(X). 
   Fixed.

   o ppm
   Parameter estimates were slightly inaccurate 
   when the model included the Geyer() interaction 
   and the "isotropic" edge correction was used.
   Fixed. 

   o [.ppx
   Crashed if the number of points selected was less than 2.
   Fixed.

   o linnet
   Crashed if there were no line segments at all.
   Fixed.

   o kppm, improve.kppm
   Crashed if the model was stationary and improve.type != "none".
   Fixed.

   o as.linim.default
   Did not correctly handle factor-valued data.
   Fixed.

   o texturemap
   Crashed if no graphical arguments were specified.
   Fixed.

   o vcov.mppm
   Ignored "..." arguments.
   Fixed.

   o Kest
   If ratio=TRUE and correction=c('border', 'none') 
   the result did not contain ratio information.
   Fixed.
   
   o plot.ppp, plot.lpp
   Arguments 'chars' and 'cols' were ignored in some cases.
   Fixed.

   o ppm
   Ignored argument 'emend'.
   Fixed.

   o plot.dppm
   Gave warnings about unrecognised argument 'objectname'.
   Fixed.

   o overlap.owin
   Sometimes returned a very small negative value, 
   when the correct answer was 0.
   Fixed.

        CHANGES IN spatstat VERSION 1.44-1

OVERVIEW

    o We thank Brian Ripley for contributions.

    o Urgent bug fix.

    o More support for replicated point patterns.

    o More support for tessellations.

    o Version nickname: 'Gift Horse'

NEW FUNCTIONS

   o as.function.tess
   Convert a tessellation to a function(x,y). The function value
   indicates which tile of the tessellation contains the point (x,y).

   o tileindex
   Determine which tile of a tessellation contains a given point (x,y).

   o persp.leverage.ppm
   Method for persp plots for objects of class leverage.ppm

   o AIC.mppm, extractAIC.mppm
   AIC for point process models fitted to replicated point patterns.

   o nobs.mppm, terms.mppm, getCall.mppm
   Methods for point process models fitted to replicated point patterns.

SIGNIFICANT USER-VISIBLE CHANGES

   o anova.mppm
   Now handles Gibbs models, and performs the
   adjusted composite likelihood ratio test.

   o update, step
   These functions now work for models of class 'mppm'.

   o textureplot
   Argument x can now be something acceptable to as.im

   o logLik.mppm
   New argument 'warn'.

BUGS

  o nncross.lpp, nnwhich.lpp, distfun.lpp
  Caused a segmentation fault.
  [Spotted by Brian Ripley.]
  Fixed.

  o anova.ppm
  If a single 'object' was given, and the object was a Gibbs model,
  then 'adjust' was effectively set to FALSE.
  Fixed.

        CHANGES IN spatstat VERSION 1.44-0

OVERVIEW

   o We thank Jonas Geldmann, Andrew Hardegen, Kassel Hingee,
     Tom Lawrence, Robin Milne, Gopalan Nair, Suman Rakshit, Peijian Shi
     and Rasmus Waagepetersen for contributions.
  
   o More support for multidimensional point patterns and point processes.

   o More options for envelopes and related Monte Carlo tests.

   o More support for model comparison.

   o k-th nearest neighbours on a linear network.

   o Penttinen process can be simulated (by Metropolis-Hastings or CFTP).

   o Calculate the predicted variance of number of points.

   o Convexifying operation for sets.

   o Subdivide a linear network.

   o Accelerated algorithms for linear networks.

   o Quadrat counting accelerated, in some cases.

   o Version nickname: 'The Sound of One Hand Typing'

NEW FUNCTIONS

   o rPenttinen
     Simulate the Penttinen process using perfect simulation.

   o varcount
     Given a point process model, compute the predicted variance
     of the number of points falling in a window.

   o inside.boxx
     Test whether multidimensional points lie inside a specified 
     multidimensional box.

   o lixellate
     Divide each segment of a linear network into smaller segments.

   o nsegments.linnet, nsegments.lpp
     Count the number of line segments in a linear network.

   o grow.boxx
     Expand a multidimensional box.

   o deviance.ppm, deviance.lppm
     Deviance for a fitted point process model.

   o pseudoR2
     Pseudo-R-squared for a fitted point process model.

   o tiles.empty
     Checks whether each tile of a tessellation is empty or nonempty.

   o summary.linim
     Summary for a pixel image on a linear network.

SIGNIFICANT USER-VISIBLE CHANGES

   o rMaternI, rMaternII
     These functions can now generate random patterns in 
     three dimensions and higher dimensions, when the argument
     'win' is of class 'box3' or 'boxx'.

   o "[.ppx"
     The subset index 'i' may now be a spatial domain
     of class 'boxx' or 'box3'.

   o rmh.ppm, rmhmodel.ppm, simulate.ppm
   A model fitted using the 'Penttinen' interaction can now be simulated.

   o rmh.default, rmhmodel.default
   These functions now recognise cif='penttinen' for the Penttinen interaction.

   o envelope
   New argument 'clamp' gives greater control over one-sided envelopes.

   o dclf.test, mad.test, dclf.progress, mad.progress, 
     dclf.sigtrace, mad.sigtrace
   New argument 'clamp' determines the test statistic for one-sided tests.

   o dclf.progress, mad.progress, dclf.sigtrace, mad.sigtrace,
    mctest.progress, mctest.sigtrace, dg.progress, dg.sigtrace
   New argument 'rmin' determines the left endpoint of the test interval.

   o dclf.test, mad.test, dg.test, dg.progress, dg.sigtrace, dg.envelope
    (also accepted by dclf.progress, mad.progress, dclf.sigtrace, mad.sigtrace)
   New argument 'leaveout' specifies how to calculate the deviation
   between the observed summary function and nominal reference value.

   o envelope
   New argument 'funargs'

   o Hest
   Argument X can now be a pixel image with logical values.
   New argument 'W'. [Based on code by Kassel Hingee.]

   o nncross.lpp, distfun.lpp
   New argument 'k' allows calculation of k-th nearest neighbour.
   Computation accelerated.

   o logLik.ppm
   New argument 'absolute'.

   o plot.kppm
   New arguments 'pause' and 'xname'.

   o tess
   Argument 'window' is ignored when xgrid, ygrid are given.

   o as.polygonal
   Can now repair errors in polygon data, if repair=TRUE.

   o rStrauss, rHardcore, rStraussHard, rDiggleGratton, rDGS, rPenttinen
   New argument 'drop'.

   o Kest.fft
   Now has '...' arguments allowing control of spatial resolution.

   o lppm
   Computation accelerated.

   o quadratcount.ppp
   Computation accelerated in some cases.

   o dg.test
   Computation accelerated.

BUGS

   o runifpointx, rpoisppx
   Crashed if nsim > 1.
   Fixed.

   o triangulate.owin
   Results were incorrect in some special cases.
   Fixed.

   o quadrat.test, clarkevans.test
   In rare cases, the computed Monte Carlo p-value could have been
   greater than 1. This could have occurred only when nsim was an even number
   and when the correct p-value was equal to 1.
   Fixed.

   o linearmarkequal
   Result was a data frame instead of an 'fv' object.
   Fixed.

   o point-in-polygon test
   The function inside.owin could take a very long time to check
   whether points are inside a polygonal window, if the coordinates
   were very large numbers. This was due to numerical overflow.
   (Fixed??)

   o as.fv.kppm	
   Crashed if the model was not fitted by minimum contrast.
   Fixed.

   o plot.fv
   Crashed in some obscure cases.
   Fixed.

   o collapse.fv
   Did not allow 'same=NULL'.
   Fixed.

   o dclf.progress, mad.progress, dg.progress, 
     dclf.sigtrace, mad.sigtrace, dg.sigtrace
   The results could not be re-plotted using a plot formula,
   because the internal data were slightly corrupted.
   Fixed.

   o Kest.fft
   Result was incorrectly normalised.
   Fixed.

   o crosspairs
   If X and Y were identical point patterns,
   the result was not necessarily symmetric
   (on some machines) due to numerical artifacts.
   Fixed.

   o plot.fv
   Lines were not correctly clipped to the plot region when 'ylim' was given.
   Fixed.

   o pool.envelope
   The 'scale' argument was not handled correctly.
   Fixed.

        CHANGES IN spatstat VERSION 1.43-0

OVERVIEW

   o We thank Leanne Bischof, Christophe Biscio, Belarmain Fandohan,
   Andrew Hardegen, Frederic Lavancier, Tom Lawrence, Martin Maechler, 
   Greg McSwiggan, Robin Milne, Gopalan Nair, Tuomas Rajala, 
   Suman Rakshit, Ben Ramage, Francois Semecurbe and Ida-Maria Sintorn 
   for contributions.

   o spatstat now depends on the package 'nlme'.

   o spatstat now depends on R 3.2.2 or later.

   o Simulation algorithms have been accelerated; simulation outcomes 
   are *not* identical to those obtained from previous versions of spatstat. 

   o Determinantal point process models.

   o Random-effects and mixed-effects models for replicated patterns.

   o Dao-Genton test, and corresponding simulation envelopes.

   o Simulated annealing and simulated tempering.

   o spatstat colour tools now handle transparent colours.

   o Improvements to "[" and subset() methods

   o Extensions to kernel smoothing on a linear network.

   o Support for one-dimensional smoothing kernels.

   o Bug fix in Metropolis-Hastings simulation.

   o Mark correlation function may include weights.

   o Cross-correlation version of the mark correlation function.

   o Variance calculations for replicated patterns.

   o Penttinen pairwise interaction model.

   o Contour plots with colours determined by a colour map.

   o New dataset: Australian states and territories.

   o More support for multi-dimensional point patterns.

   o Minor improvements and bug fixes.

   o Version nickname: "Mixed Effects"

NEW DATASET

   o austates
   The states and large mainland territories of Australia
   represented as polygonal regions forming a tessellation.

NEW FUNCTIONS

   o dppm
   Fit a determinantal point process model to point pattern data.

   o fitted.dppm, predict.dppm, intensity.dppm
   Predict a fitted dppm object.

   o logLik.dppm, AIC.dppm, extractAIC.dppm, nobs.dppm
   Likelihood and AIC for determinantal point process models
   (enabling the use of 'step')

   o coef.dppm, formula.dppm, print.dppm, terms.dppm, labels.dppm,
   model.frame.dppm, model.matrix.dppm, model.images.dppm,
   is.stationary.dppm, reach.dppm, unitname.dppm, unitname<-.dppm, Window.dppm
    Various methods for dppm objects.

   o parameters.dppm
   Extract meaningful list of model parameters

   o objsurf.dppm
   Objective function surface of a dppm object

   o residuals.dppm
   Residual measure for a dppm object.

   o dppBessel, dppCauchy, dppGauss, dppMatern,	dppPowerExp
   Determinantal Point Process models.

   o update.dppmodel            
   Set parameter values in a dpp model.

   o is.stationary.dppmodel, print.dppmodel, reach.dppmodel, valid.dppmodel    
   Basic information about a dpp model

   o rdpp, simulate.dppmodel		 
   Simulation of a dpp model.

   o intensity.dppmodel, Kmodel.dppmodel, pcfmodel.dppmodel
   Moments of a dpp model

   o dim.dppmodel, dppapproxkernel, dppapproxpcf, dppeigen, dppfamily,
   dppkernel, dppparbounds, dppspecdenrange, dppspecden
   Helper functions for dpp models.

   o dclf.sigtrace, mad.sigtrace, mctest.sigtrace
   Significance trace of Monte Carlo test

   o dg.test
   Dao-Genton adjusted Monte Carlo goodness-of-fit test.

   o dg.envelope
   Simulation envelopes corresponding to Dao-Genton test.

   o dg.sigtrace
   Significance trace for Dao-Genton test

   o dg.progress
   Progress plot for Dao-Genton test

   o markcrosscorr
   Mark cross-correlation function for point patterns with
   several columns of marks

   o fixef.mppm, ranef.mppm
   Extract fixed effects and random effects from a point process model
   fitted to replicated point patterns.

   o rtemper
   Simulated annealing or simulated tempering.

   o to.opaque, to.transparent
   Change transparency value in colours

   o rgb2hsva
   Convert RGB to HSV data, like rgb2hsv, but preserving transparency.

   o superimpose.ppplist, superimpose.splitppp
   New methods for 'superimpose' for lists of point patterns.

   o dkernel, pkernel, qkernel, rkernel
   Probability density, cumulative probability, quantiles
   and random generation from distributions used in basic one-dimensional
   kernel smoothing.

   o kernel.factor
   Auxiliary calculations for one-dimensional kernel smoothing.

   o PPversion, QQversion
   Transformation of a summary function to its P-P or Q-Q counterpart.

   o spatdim
   Spatial dimension of any object in the spatstat package.

   o as.boxx
   Convert data to a multi-dimensional box.

   o intensity.ppx
   Method for 'intensity' for multi-dimensional space-time point patterns.

   o fourierbasis
   Evaluate Fourier basis functions in any number of dimensions.

   o valid
   New generic function, with methods valid.ppm, valid.lppm, valid.dppmodel
   
   o emend, emend.ppm, emend.lppm
   New generic function with methods for ppm and lppm.
   emend.ppm is equivalent to project.ppm

   o Penttinen
   New pairwise interaction model.

   o quantile.density
   Calculates quantiles from kernel density estimates.

   o CDF.density
   Calculates cumulative distribution function from kernel density estimates.

SIGNIFICANT USER-VISIBLE CHANGES

   o simulation
   Several basic simulation algorithms have been accelerated.
   Consequently, simulation outcomes are not identical to 
   those obtained with previous versions of spatstat, even when the
   same random seed is used. To ensure compatibility with previous
   versions of spatstat, revert to the slower code by setting
   spatstat.options(fastthin=FALSE, fastpois=FALSE).

   o mppm
   Now handles models with a random effect component.
   New argument 'random' is a formula specifying the random effect.

   o vcov.mppm
   Now handles models with Gibbs interactions.

   o [.ppp
   New argument 'clip' determines whether the window is clipped.

   o [.ppp
   The previously-unused argument 'drop' now determines whether 
   to remove unused levels of a factor.

   o [.pp3, [.lpp, [.ppx, subset.ppp, subset.pp3, subset.lpp, subset.ppx
   These methods now have an argument 'drop' which determines
   whether to remove unused levels of a factor.

   o density.lpp
   Now supports both the 'equal-split continuous' and 
   'equal-split discontinuous' smoothers. New argument 'continuous' 
   determines the choice of smoother.

   o envelope
   New argument 'scale' allows global envelopes to have 
   width proportional to a specified function of r,
   rather than constant width.

   o dclf.test, mad.test, dclf.progress, mad.progress, mctest.progress
   New argument 'scale' allows summary function values to be rescaled
   before the comparison is performed.

   o dclf.test, mad.test
   New argument 'interpolate' supports interpolation of p-value.

   o dclf.progress, mad.progress, mctest.progress
   New argument 'interpolate' supports interpolation of critical value of test.

   o simulate.ppm
   New argument 'w' controls the window of the simulated patterns.

   o default.rmhcontrol, default.rmhexpand
   New argument 'w'.

   o markcorr
   New argument 'weights' allows computation of the weighted version
   of the mark correlation function.

   o density.lpp
   New argument 'kernel' specifies the smoothing kernel.
   Any of the standard one-dimensional smoothing kernels can be used.

   o contour.im
   New argument 'col' specifies the colour of the contour lines.
   If 'col' is a colour map, then the contours are drawn in different colours.

   o plot.ppp
   The default colour for the points is now a transparent grey,
   if this is supported by the plot device.

   o rgbim, hsvim
   New argument 'A' controls the alpha (transparency) channel.

   o rgb2hex, col2hex, paletteindex, is.colour, samecolour,
   complementarycolour, is.grey, to.grey
   These colour tools now handle transparent colours.

   o rgb2hex
   New argument 'maxColorValue'

   o to.grey
   New argument 'transparent'.

   o progressreport
   New argument 'state'
   New option: style="tk"

   o rLGCP
   This function no longer requires the package 'RandomFields'
   to be loaded explicitly. 

   o kppm
   Fitting a model with clusters="LGCP" no longer requires the
   package 'RandomFields' to be loaded explicitly.

   o rpoispp
   Accelerated, when 'lambda' is a pixel image.

   o rthin
   Accelerated, when 'P' is a single number.

   o spatstat.options
   New options 'fastthin' and 'fastpois' enable fast simulation algorithms.
   Set these options to FALSE to reproduce results obtained with
   previous versions of spatstat.

   o split.ppp
   The splitting variable 'f' can now be a logical vector.

   o collapse.fv
   This is now treated as a method for the 'nlme' generic 'collapse'.
   Its syntax has been adjusted slightly.

   o diagnose.ppm, plot.diagppm
   New arguments col.neg, col.smooth control the colour maps.

   o valid.ppm
   This is now a method for the generic function 'valid'.

   o ppm.ppp, ppm.quad
   New argument 'emend', equivalent to 'project'.

   o "[<-.im"
   Accepts an array for 'value'.

   o as.im.function
   New argument 'strict'.

   o bw.ppl
   New argument 'weights'.

   o plot.mppm
   New argument 'se'.
   
   o dclf.test, mad.test
   Formal arguments 'use.theo' and 'internal' have been removed.

   o predict.kppm, residuals.kppm
   Now issues a warning when the calculation ignores the 
   cluster/Cox component and treats the model as if it were Poisson.
   (This currently happens in predict.kppm when se=TRUE or interval != "none",
   and in residuals.kppm when type != "raw").

BUG FIXES

   o lpp
   Crashed if X was a 4-column matrix.
   Fixed.

   o plot.fv
   Crashed with some graphics devices, if legend=TRUE.
   Fixed.

   o effectfun
   Crashed if 'covname' was missing.
   Fixed.

   o rVarGamma, rMatClust, rThomas, rCauchy, rNeymanScott
   Crashed if 'kappa' was a function or image instead of a single number.
   [Spotted by Ben Ramage.]
   Fixed.

   o plot.mppm
   Crashed with a message about "figure margins too large"
   unless the argument se=FALSE was given explicitly.
   Fixed.

   o opening.owin, closing.owin
   Crashed sometimes, with a message about a rectangle not containing a window.
   Fixed.

   o persp.im
   Crashed if all pixel values were equal to zero (unless zlim was given).
   Fixed.

   o predict.ppm
   Crashed sometimes if the model was fitted with use.gam=TRUE.

   o as.linim.linfun
   Generated an error ('L must be a linear network')
   if extra arguments were given.

   o as.function.fv
   Generated an error when executed in the 'covr' package.
   Fixed.

   o rmh, simulate.ppm
   Results were incorrect for inhomogeneous multitype models
   simulated with fixall=TRUE (i.e. prescribing a fixed number of
   points of each type) if the model was segregated 
   (i.e. if different types of points had different first order trend).
   Fixed.

   o dclf.progress, mad.progress
   Ignored the argument 'alternative'. 
   Fixed.
   
   o $<-.hyperframe, [<-.hyperframe
   Result was garbled if 'value' was a hyperframe with one column.

   o rmh.ppm
   Argument 'w' was ignored in some cases.
   Fixed.

   o Hest
   There was an artefact at r=0 when conditional=TRUE.
   Fixed.

   o [.msr
   The result of M[W] where W is a window
   was a measure with window W, instead of intersect.owin(W, Window(M)).
   Fixed.

   o pool.envelope
   Did not always respect the value of 'use.theory'.
   Fixed.

   o envelope, pool.envelope
   If 'ginterval' was given, the results were in a slightly incorrect format.
   Fixed.

   o pool.envelope
   Did not check for compatible values of 'ginterval'.
   Fixed.

        CHANGES IN spatstat VERSION 1.42-2

OVERVIEW

   o We thank Bob Klaver and Harold-Jeffrey Ship for contributions.

   o Improvements to simulation of Neyman-Scott processes.

   o Improvements to fitting of Neyman-Scott models.

   o Extended functionality for pixel images.

   o Fitted intensity on linear network

   o Triangulation of windows.

   o Corrected an edge correction.

   o Bug fixes and performance improvements.

   o Nickname: 'Barking at Balloons'

NEW FUNCTIONS

   o triangulate.owin
   Decompose a spatial window into triangles.

   o fitted.lppm
   Fitted intensity values for a point process on a linear network.

SIGNIFICANT USER-VISIBLE CHANGES

   o rThomas, rMatClust, rCauchy, rVarGamma
   When the model is approximately Poisson, it is simulated using rpoispp. 
   This avoids computations which would require huge amounts of memory. 
   New argument 'poisthresh' controls this behaviour.

   o update.kppm
   Now handles additional arguments in any order, with or without names.
   Changed arguments. Improved behaviour.

   o kppm, clusterfit
   New argument 'algorithm' specifies the choice of optimisation algorithm.

   o kppm
   Left hand side of formula can now involve entries in the list 'data'.

   o rotmean
   New argument 'padzero'. 
   Default behaviour has changed.

   o rose.default
   New argument 'weights'.

   o rose
   New arguments 'start' and 'clockwise' specify the convention
   for measuring and plotting angles.

   o padimage 
   New argument 'W' allows an image to be padded out to fill any window.

   o union.owin
   Improved behaviour when there are more than 2 windows.

   o clusterset
   Improved behaviour.

   o affine.owin
   Allows transformation matrix to be singular, if the window is polygonal.

BUG FIXES

   o spatstat
   spatstat could not be installed on some 64-bit VM systems
   because of an apparent bug in R.
   Fixed.

   o rThomas, rMatClust, rCauchy, rVarGamma
   Large values of the scale parameter could cause the algorithm to freeze
   or require huge amounts of memory.
   Fixed.

   o pcf, pcfinhom
   Crashed if the point pattern was empty.
   Fixed.

   o plot.fv
   Gave an error message if all 'y' values were equal, when legend=TRUE.
   Fixed.

   o rose.default
   Display was incorrect when unit="radian".
   Fixed.

   o Kest
   Ohser-Stoyan rigid motion correction (correction='rigid')
   was calculated incorrectly at large distances.
   Fixed.

   o summary.im
   Issued a warning about numerical overflow in some cases.
   [Spotted by Bob Klaver.]
   Fixed.

   o plot.im
   Sometimes warned that 'box' is not a graphical parameter.
   Fixed.

        CHANGES IN spatstat VERSION 1.42-1

OVERVIEW

   o We thank Andrew Hardegen, Tom Lawrence, Robin Milne, Suman Rakshit,
   and Brian Ripley for contributions.

   o Urgent bug fix.

   o More robust simulation of cluster processes.

   o Slightly accelerated.

   o Version nickname: 'Vogon Poetry'

NEW FUNCTIONS

   o boundingbox.solist
   Method for boundingbox for lists of spatial objects.

SIGNIFICANT USER-VISIBLE CHANGES

   o rThomas, rMatClust, rCauchy, rVarGamma, rNeymanScott
   New faster algorithm which is more robust against extreme values of
   the parameters.

   o rNeymanScott
   New argument 'nonempty' controls choice of algorithm.

   o solist, as.solist
   Accelerated. 

   o as.list.hyperframe
   Accelerated. 

BUG FIXES

   o residuals.mppm
   Brought some computers to a grinding halt, due to the bug in solist().
   Fixed.

   o solist, as.solist
   In rare cases, the format was corrupted, or the algorithm never terminated.
   Fixed.

        CHANGES IN spatstat VERSION 1.42-0

OVERVIEW

   o We thank Anders Bilgrau, Ute Hahn, Jack Hywood, Tuomas Rajala,
   Cody Schank, Olivia Semboli and Ben Taylor for contributions.

   o Version nickname: 'Life, The Universe and Everything'

   o Permutation test for difference between groups of point patterns.

   o Variational Bayes estimation for point process models.

   o Score test in anova.ppm

   o ROC curve, and discrimination index AUC, for fitted models.
   
   o Interactive text editor for spatial datasets.

   o Tools for analysing data on a tree. 

   o Kernel density/intensity estimation on a linear network.

   o Random pixel noise.

   o Improved behaviour of polygon geometry operations.

   o Improved support for cluster and Cox models.

   o Improved basic support for owin objects.

   o Improved support for tessellations.

   o More hierarchical Gibbs interactions.

   o Modifications to Kest.

   o summary method for Cox and cluster models.

   o class 'listof' is almost completely replaced by 'anylist' and 'solist'.

   o Improvements and bug fixes.

   o spatstat now depends on R version 3.2.0 or later.

NEW FUNCTIONS

   o studpermu.test
   Studentised permutation test for difference between groups of point patterns.
   Generously contributed by Ute Hahn.

   o AIC.kppm, extractAIC.kppm, logLik.kppm, nobs.kppm
   Methods for computing AIC for fitted Cox and cluster models.

   o transmat
   Convert pixel arrays between different display conventions.

   o roc
   Receiver Operating Characteristic curve.

   o auc
   Discrimination index AUC (area under the ROC curve) 

   o edit.ppp, edit.psp, edit.im
   Interactive text editor works for spatial datasets.

   o edit.hyperframe
   Interactive text editor works for hyperframes.

   o parameters
   Extract all parameters from a fitted model.

   o density.lpp
   Kernel estimation of point process intensity on a linear network.

   o extractbranch, deletebranch, treeprune, treebranchlabels, begins
   Tools for analysing data on a tree.

   o rnoise
   Random pixel noise.

   o as.data.frame.owin
   Convert a window to a data frame.

   o harmonise.owin
   Convert several binary mask windows to a common pixel grid.

   o copyExampleFiles
   Copy the raw data files from an installed dataset
   to a chosen folder, for use in a practice exercise.

   o density.ppplist
   Method for 'density' for lists of point patterns.

   o inradius
   Radius of largest circle inside a window.

   o mergeLevels
   Merge different levels of a factor.
   
   o relevel.im, relevel.ppp, relevel.ppx
   Change the reference level of a factor.

   o simulate.profilepl
   simulation method for models fitted by profile maximum pseudolikelihood.

   o predict.rho2hat
   Prediction method for class rho2hat

   o with.msr
   Evaluate (an expression involving) components of a measure. 

   o summary.kppm, print.summary.kppm, coef.summary.kppm
   Methods for 'summary' and 'coef(summary(..))' for Cox and cluster models.

   o as.im.funxy
   Method for as.im for class funxy.

   o shift.linim, scalardilate.linim, affine.linim
   Geometrical transformations for 'linim' objects.

   o Smooth.solist
   Smooth method for a list of spatial objects.

   o unitname.tess, unitname<-.tess
   Tessellations now keep track of the name of the unit of length.

   o dirichletAreas
   Faster algorithm for tile.areas(dirichlet(X)).

   o identify.lpp
   Method for 'identify' for point patterns on a linear network.

   o HierStraussHard, HierHard
   Hierarchical interactions for Gibbs models.

   o delaunayDistance, delaunayNetwork, dirichletEdges, 
   dirichletNetwork, dirichletVertices, dirichletWeights
      These functions will replace delaunay.distance, delaunay.network, 
   dirichlet.edges, dirichlet.network, dirichlet.vertices and
   dirichlet.weights respectively.
   The latter are now 'deprecated'.

SIGNIFICANT USER-VISIBLE CHANGES

   o ppm
   Now supports Variational Bayes fitting method.

   o kppm
   'AIC' and 'step' now work for kppm objects
   fitted using maximum Palm likelihood.

   o kppm
   The default for the weight function 'weightfun' has been changed, 
   for better performance.

   o envelope
   envelope methods now have argument 'use.theory' specifying whether
   to use the 'theoretical' value of the summary function when constructing
   simultaneous envelopes.

   o anova.ppm
   Now performs the Score Test, for Poisson models only,
   if argument test="Rao" or test="score".

   o Kest
   New argument 'rmax' controls maximum value of argument 'r'

   o diagnose.ppm
   Now computes and prints the null standard deviation of the
   smoothed Pearson residual field, when appropriate.

   o nncorr, nnmean, nnvario
   New argument 'k' specifies k-th nearest neighbour.

   o quadrat.test.ppp, quadrat.test.quadratcount
   New argument 'lambda' supports a test of the Poisson process 
   with given intensity 'lambda'.

   o clickpoly, clickbox
   These functions now handle graphical arguments to polygon()
   when drawing the resulting polygon or rectangle.

   o owin, as.owin, as.mask
   owin(mask=D) or as.owin(D) or as.mask(D) will produce a binary mask window
   if D is a data frame with two columns of (x,y) coordinates
   or a data frame with three columns containing (x,y,logical).

   o as.owin.data.frame
   W can now be a data frame with only two columns,
   giving the spatial coordinates of the pixels that are inside the window.

   o rose
   Tick marks now have labels showing the angle (in degrees or radians).

   o distcdf
   New argument 'regularise' determines whether values at short distances
   will be smoothed to avoid discretisation artefacts.

   o rpoislinetess
   Return value now has an attribute 'lines' giving the 
   realisation of the Poisson line process.

   o intersect.owin, union.owin, setminus.owin
   New argument 'p' controls resolution of polygon clipping algorithm.

   o intersect.owin, union.owin
   Arguments may be lists of windows, of class 'solist'.
   Formal arguments A and B have been removed.

   o superimpose
   Now handles lists of point patterns 
   (objects of class 'ppplist' or 'splitppp')

   o density.ppp
   New argument 'positive' allows the user to stipulate that
   density values must be positive (avoiding numerical errors
   which occasionally produce small negative values).

   o adaptive.density
   Now accepts f = 0 (uniform intensity estimate) and
   f = 1 (Voronoi intensity estimate) as well as 0 < f < 1.
   Algorithm accelerated.

   o rSSI
   Can now generate inhomogeneous patterns.

   o effectfun
   Now works for 'kppm' and 'lppm' objects as well.

   o integral.im, integral.msr
   Argument 'domain' can now be a tessellation;
   the integral over each tile of the tessellation is returned.

   o allstats, compareFit, markcorr, split.ppx, by.ppp
   Result is now of class 'anylist'.

   o by.im, density.splitppp, idw, model.images, nnmark, pixellate.ppp,
   predict.lppm, predict.ppm, quadratcount.splitppp, quadratresample, relrisk, 
   Smooth.msr, split.im, tiles
   Result is now of class 'solist'.

   o split.ppp
   New argument 'reduce'.
   Result now inherits class 'ppplist' and 'solist', as well as 'splitppp'

   o rLGCP
   New argument 'nsim' allows multiple patterns to be generated.

   o alltypes
   New argument 'reuse' determines whether all simulation envelopes
   are based on the same set of simulated patterns, or on independent sets.

   o rpoispp, runifpoint
   New argument 'ex' makes it possible to generate a random pattern
   similar to an example point pattern.

   o effectfun
   Argument 'covname' is not needed if the model has only one covariate.

   o quadratcount
   Argument 'tess' can now be anything acceptable to as.tess.

   o tess
   New argument 'unitname' specifies the name of the unit of length.
   If it is missing, unitname information will be extracted from the
   other data.

   o intersect.tess, chop.tess, quadrats
   Results of these functions now have the same 'unitname' as their input.

   o persp.im, nnclean, plot.qqppm, plot.bw.optim
   These plotting functions now obey spatstat.options('monochrome')

   o lurking
   Now returns an object of class 'lurk' which has a plot method.
   Two-standard-deviation limits are now plotted using grey shading.

   o marktable
   New argument 'N' for studying the N nearest neighbours.   
   New argument 'collapse' for manipulating the contingency table.

   o harmonise.fv
   Now discards columns with names which do not match.

   o eval.fv
   New argument 'equiv' can be used to declare that two columns
   with different names in different objects are equivalent.

   o quantile.ewcdf
   New argument 'type' controls the type of quantile.
   
   o plot.imlist
   New argument 'plotcommand' specifies how to plot each image.

   o persp.im
   The lower extent of the apron can now be controlled by 'zlim'.

   o quadscheme
   Argument 'method' is partially matched.

   o Kdot, Ldot
   New argument 'from' is an alternative to 'i'.

   o Kcross, Lcross
   New arguments 'from' and 'to' are alternatives to 'i' and 'j' respectively.

   o varblock
   Changed the ordering (and therefore default colours/styles) 
   of curves in the plot, to match other functions like lohboot.

   o bw.diggle
   New argument 'nr' controls accuracy.

   o textureplot
   Now accepts a pixel image, a tessellation, or anything acceptable to as.tess.

   o textureplot
   Line spacing in legend now matches line spacing in main display.
   
   o [.tess
   Subset index can now be a window.

   o plot.tess
   Can now plot a text label in each tile.

   o plot.tess
   New argument 'do.plot'.

   o MultiHard, MultiStrauss, MultiStraussHard, HierStrauss
   Printed output of fitted model now respects spatstat.options('terse').

   o print.ppm
   Reduced redundancy in output in some cases.

   o print.msr
   Responds better to spatstat.options('terse').

   o print.ppm, print.fii, print.interact
   Irregular parameters are now printed to the number of significant figures
   specified by options("digits").

   o square
   New argument 'unitname'.

   o plot.fv
   Return value is now invisible.

   o delaunay.distance, delaunay.network, dirichlet.edges, 
   dirichlet.network, dirichlet.vertices
      These functions are now 'deprecated', and will be replaced by
      delaunayDistance, delaunayNetwork, dirichletEdges, 
      dirichletNetwork and dirichletVertices respectively.

   o data(residualspaper)
   In the real datasets (Fig1 and Fig11), the name of the unit of length
   has now been recorded.

   o rLGCP
   This function now requires the package 'RandomFields'
   to be loaded explicitly by library(RandomFields) or require(RandomFields), 
   unless model="exp".

   o iplot, istat
   These functions now require the package 'rpanel' 
   to be loaded explicitly by library(rpanel) or require(rpanel).

   o ppm, quadscheme
   Improved calculation of Dirichlet weights.

   o countends
   New argument 'toler' controls numerical errors

   o diagnose.ppm
   Improved handling of additional graphics arguments.

   o pcf3est
   Mathematical labels changed.

   o plot.hyperframe
   Default margin spacing has been increased.

BUG FIXES

   o Kinhom, Linhom
   The value of 'theo' was erroneously rescaled 
   by a small amount, when renormalise=TRUE (the default).
   Fixed.

   o Kmark
   Values were erroneously rescaled.
   Fixed.

   o union.owin
   Strange results were sometimes obtained when taking the union 
   of more than two windows.
   Fixed.

   o rpoispp3 
   Implementation was incorrect for nsim > 1.
   (Results may have been incorrect.)
   Spotted by Jack Hywood.
   Fixed.
   
   o as.owin.data.frame
   Crashed if the window was not connected.
   Fixed.

   o Frame<-
   Crashed when applied to a binary mask.
   Fixed.

   o rho2hat
   Crashed if cov1="x" and cov2="y".
   Fixed.

   o as.mask
   Crashed sometimes when only the argument 'xy' was given.
   Fixed.

   o ppm
   Crashed (rarely) when method='ho' if the simulated pattern was empty.
   Fixed.

   o istat, iplot
   Crashed in recent versions of rpanel.
   Fixed.

   o convexhull
   Crashed if applied to a 'psp' object.
   Fixed.

   o plot.ppm
   Crashed with message about 'variable lengths differ'.
   Fixed.

   o plot.solist
   Crashed when applied to a list of point patterns
   if some patterns had more than one column of marks.
   Fixed.

   o Smooth.ppp
   Crashed if applied to a point pattern with several columns of marks
   if some of the columns were factors.
   Fixed.

   o runifpoint3, rpoispp3
   Crashed if nsim > 1.
   Spotted by Jack Hywood.
   Fixed.

   o hist.im
   Crashed if argument 'freq' was given.
   Fixed.

   o MultiStraussHard
   Generated misleading error messages (e.g. 'model is invalid') 
   when arguments 'iradii' and 'hradii' did not have the same pattern of NA's.
   Fixed.

   o plot.solist
   Figures were sometimes aligned incorrectly 
   when the argument 'panel.args' was given.
   Fixed.

   o scaletointerval
   Results sometimes fell slightly outside the desired interval
   due to numerical error.
   Fixed.

   o plot.solist
   Behaved incorrectly when plotcommand='persp'.
   Fixed.

   o "[.hyperframe"
   Sometimes returned an 'anylist' when it should have returned a 'solist'.
   Fixed.

   o plot.im
   Did not plot surrounding frame box when ribbon=FALSE.
   Fixed.

   o envelope
   The functions stored when savefuns=TRUE did not inherit 
   the correct name for the unit of length.
   Fixed.

   o print.ppm, print.fii, print.interact
   Layout was misaligned.
   Fixed.

   o plot.plotppm
   Paused for input when it was not appropriate.
   Fixed.

   o plot.fv
   On png devices, the legend box was drawn with a white background,
   obscuring the main plot. 
   Fixed.

   o plot.owin, plot.ppp, plot.im
   There was unnecessary extra space above the main title.
   Fixed.

   o plot.rho2hat
   Colour map ribbon was drawn but not annotated.
   Fixed.

   o density.splitppp, density.ppplist
   Format was out of order if se=TRUE.
   Fixed.

   o MultiStraussHard
   project.ppm sometimes yielded a model that was still invalid.
   Fixed.

        CHANGES IN spatstat VERSION 1.41-1

OVERVIEW

   o This is identical to the major release 1.41-0 except for
    minor bug fixes. The change log for 1.41-0 is repeated here
    with minor modifications.

   o Version nickname: 'Ides of March'

   o We thank Ahmed El-Gabbas, Ute Hahn, Aruna Jammalamadaka,
   Ian Renner, Brian Ripley, Torben Tvedebrink and Sasha Voss 
   for contributions.

   o Fixed a bug causing a segmentation fault.

   o Standard errors for kernel estimates of intensity.

   o Test for segregation.

   o Tessellations may now have marks.

   o Nested splitting.

   o More support for cluster models. Reorganised parametrisation.

   o Sparse data representation of linear networks.

   o More support for data on a linear network.

   o New datasets: 'spiders' and 'dendrite'.

   o Improvements and bug fixes.

   o spatstat no longer uses Fortran.

   o spatstat no longer depends on the package 'scatterplot3d'.

   o spatstat now imports (rather than 'suggests') the Matrix package.

NEW DATASETS

   o dendrite
   Dendritic spines on the dendrite network of a neuron.
   A point pattern on a linear network.
   Generously contributed by Aruna Jammalamadaka.

   o spiders
   Spider webs on the mortar lines of a brick wall.
   A point pattern on a linear network.
   Generously contributed by Sasha Voss.

NEW FUNCTIONS

   o segregation.test
   Test of spatial segregation of types in a multitype point pattern.

   o clusterfield, clusterkernel
   Compute the cluster kernel (offspring density) of a cluster process model,
   or compute the cluster field generated by superimposing copies 
   of the cluster kernel at specified locations.

   o clusterradius
   Compute the radius of the support of the offspring density
   of a cluster process model. 

   o as.linnet.psp
   Convert a line segment pattern to a linear network
   by guessing the connectivity using a distance threshold.

   o iplot.linnet, iplot.lpp
   Methods for interactive plotting 'iplot' for objects of class lpp and linnet.

   o Mathematical operations are now supported for pixel images
   on a linear network. See help(Math.linim)

   o dirichlet.network, delaunay.network
   The linear networks formed by the Dirichlet tessellation 
   and Delaunay triangulation.

   o dirichlet.edges
   The edges of the Dirichlet tessellation.

   o selfcut.psp
   Cut line segments where they cross each other.

   o vertices.linnet
   Extract the vertices (nodes) of the linear network.

   o vertexdegree
   Compute the degree of each vertex in a linear network.

   o pixellate.linnet
   Pixellate a linear network.

   o subset.hyperframe
   'subset' method for class 'hyperframe'.

   o head.hyperframe, tail.hyperframe
   'head' and 'tail' methods for hyperframes.

   o clickdist
   Measures the distance between two spatial locations clicked by the user.

   o solapply, anylapply
   wrappers for 'lapply' which return a list of class 'solist' or 'anylist'.

   o Kmark
   Weighted K-function. 
   Identical to 'markcorrint' and will eventually replace it.

   o marks.tess, marks<-.tess, unmark.tess:
   Extract or change the marks associated with the tiles of a tessellation.

   o quantess
   Quantile tessellation: divide space into pieces which contain
   equal amounts of 'stuff'.

   o nestsplit
   Nested split

   o integral
   New generic function for integrating functions,
   with methods for 'im', 'msr', 'linim' and 'linfun'.

   o selfcut.psp
   Cut line segments where they cross each other

   o as.function.im
   Convert a pixel image to a function(x,y).

   o as.linnet.linim
   Extract the linear network from a 'linim' object.

   o pool.fv, pool.anylist
   New methods for 'pool' 

   o Window.linnet
   Extract the two-dimensional window containing a linear network.

SIGNIFICANT USER-VISIBLE CHANGES

   o linnet, lpp
   A linear network can now be built in 'sparse matrix' form
   which requires much less memory. 

   o chicago
   The Chicago street crimes data are now stored in 'sparse matrix' form.
   To convert them to non-sparse form, use as.lpp(chicago, sparse=FALSE)

   o kppm
   The parametrisation of cluster models has been reorganised.
   The scale parameter is now always called 'scale'.
   Results should be backward-compatible.

   o cauchy.estK, cauchy.estpcf, matclust.estK, matclust.estpcf, 
   thomas.estK, thomas.estpcf, vargamma.estK, vargamma.estpcf
    The parametrisation of cluster models has been reorganised.
    The scale parameter is now always called 'scale'.
   
   o plot.kppm 
   Also plots the cluster kernel.

   o density.ppp
   New argument 'se' allows calculation of standard errors as well.

   o plot.pp3
   Now produces a genuine perspective view.
   New arguments control the eye position for the perspective view.

   o Emark, Vmark
   These functions can now work with multiple columns of marks.

   o pixellate.psp
   Can now count the number of segments that intersect each pixel, 
   instead of the total length of intersection.

   o linfun
   If  g = linfun(f, L),
   the function f will always be called as f(x,y,seg,tp, ...)
   It is no longer expected to handle the case where 'seg' and 'tp' are absent.
   The resulting function g can now be called as g(X) where X is an lpp object,
   or as g(x,y) or g(x,y,seg,tp) where x,y,seg,tp are coordinates.

   o tess
   New argument 'marks' allows marks to be associated with tiles.

   o anova.lppm
   Outdated argument 'override' has been removed.

   o split<-.ppp
   Preserves the original ordering of the data, if possible.

   o MultiHard, MultiStrauss, MultiStraussHard, HierStrauss
   Zero values in the interaction radii are now treated as NA.
   Improved handling of missing arguments.
   Printed output now respects options('width')

   o linearKinhom, linearKcross.inhom, linearKdot.inhom,
     linearpcfinhom, linearpcfcross.inhom, linearpcfdot.inhom
   If the intensity argument lambda, lambdaI, lambdaJ, lambdadot
   is a fitted point process model, the model is first updated
   by re-fitting it to the data, before computing the fitted intensity.

   o solutionset
   The expression will be evaluated using pixel arithmetic (Math.im)
   if it cannot be evaluated using eval.im.

   o to.grey
   Now uses better weights for the R, G, B channels.

   o rVarGamma
   Accelerated.

   o summary.mppm, print.mppm
   These functions now respect options('width') and spatstat.options('terse').

   o print.quadrattest
   Now respects options('width') and spatstat.options('terse').

   o print.pp3
   Now respects options('width')

   o print.lpp
   Now respects options('width') and options('digits').

   o print.owin, print.im, print.summary.owin, print.summary.im
   Now respect options('width').

   o nnmean
   Now yields a vector, instead of a 1-column matrix,
   when there is only a single column of marks.

   o pairdist.psp, crossdist.psp, nndist.psp
   The option 'method="Fortran"' is no longer supported.
   The default is 'method="C"'.
 
   o [.hyperframe:
   When a row of data is extracted with drop=TRUE, the result
   belongs to class 'anylist'.

   o installation of spatstat
   A Fortran compiler is no longer needed to compile spatstat from source.

   o hyperframe class
   The internal structure of hyperframes has changed slightly:
   columns of objects are now stored and returned as
   lists of class 'anylist' or 'solist'.
   There should be no change in behaviour.

   o datasets
   Internal format of the datasets 
   	    bdspots, bei, clmfires, demohyper, flu, gorillas, heather, 
	    Kovesi, murchison, osteo, pyramidal, waterstriders
   has changed slightly to use the classes 'anylist' and 'solist'.
   There should be no change in behaviour.

   o K3est
   New argument 'ratio'.

   o spatstat.options
   New option 'par.points3d' sets default arguments for plot.pp3. 

   o diagnose.ppm
   New arguments 'xlab', 'ylab', 'rlab' determine the labels
   in the 4-panel plot, and new argument 'outer' controls their position.
   The confusing default value for 'compute.sd' has been changed.

   o iplot.layered
   New argument 'visible' controls which layers are initially visible.

   o plot.lpp
   New argument 'show.window' controls whether to plot the containing window.
   
   o textstring
   Any number of spatial locations (x,y) can be specified,
   with a corresponding vector of text strings.

   o plot.hyperframe
   New argument 'mar' 

   o plot.linnet
   New argument 'do.plot'

   o summary.hyperframe
   Improved output.

   o eval.linim
   Improved scoping rules.

   o pixellate.owin
   Accelerated.

   o summary.linnet
   Now prints more information, and respects options('digits').

   o rmpoispp, rmpoint
   The vector of possible types of points will default to the 'names' vector
   of the argument 'lambda', 'n', or 'f' where appropriate.

   o rpoislpp
   Argument 'L' can be omitted when lambda is a 'linim' or 'linfun'

   o simulate.ppm, simulate.kppm, simulate.lppm, simulate.slrm
   New argument 'drop': if nsim = 1 and drop=TRUE, the result is a point pattern
   rather than a list containing one point pattern.

   o runifdisc, runifpoint, rpoint, rpoispp, rmpoint, rmpoispp, 
   rMaternI, rMaternII, rSSI, rPoissonCluster, rGaussPoisson,
   rstrat, rsyst, rcell, rthin, rNeymanScott, rMatClust, rThomas,
   rCauchy, rVarGamma, rpoispp3, runifpoint3
   New argument 'drop': if nsim = 1 and drop=TRUE, the result is a point pattern
   rather than a list containing one point pattern.

   o spatstat.options
   New option 'units.paren' controls the type of parenthesis
   enclosing the explanatory text about the unit of length,
   in print.ppm, plot.fv, etc.

   o closepairs, crosspairs
   New option: what="ijd" returns only the indices i, j and the distance d

   o rCauchy, rMatClust, rNeymanScott, rPoissonCluster, rThomas, rVarGamma
   Argument names have changed.

BUG FIXES

   o sumouter
   A segmentation fault could occur if any data were NA.
   Fixed.

   o simulate.kppm
   Simulation failed for log-Gaussian Cox processes (in simulate.kppm only) 
   with an error message from the RandomFields package.
   Fixed.

   o ppm,  predict.ppm, profilepl
   Crashed sometimes with message 
   "interaction evaluator did not return a matrix".
   Fixed.

   o lppm
   step() did not work correctly on 'lppm' objects.
   Fixed.

   o quadscheme
   If quadscheme() was called explicitly, with the stipulated number of tiles
   exceeding the number of dummy points given, then the quadrature weights 
   were sometimes vastly inflated - total quadrature weight was
   much larger than window area. Spotted by Ian Renner. 
   Fixed.   

   o predict.rhohat
   Result was incorrect for data on a non-rectangular window 
   (and a warning was issued about incorrect vector length).
   Fixed.

   o Math.im
   Unary operators did not work (e.g."-x")
   Fixed.
   
   o density.ppp
   Crashed when at="points" if the dataset had exactly 1 point.
   Fixed.

   o rSSI
   Crashed if nsim > 1.
   Fixed.

   o influence.ppm, leverage.ppm, dfbetas.ppm
   Crashed or issued a warning if any quadrature points had 
   conditional intensity zero under the model (negative infinite values
   of the sufficient statistic).
   Fixed.

   o clickppp, clickpoly
   Did not work correctly in the RStudio display device.
   Fixed.

   o Iest
   Ignored the arguments 'r' and 'eps'.
   Fixed.

   o markvario
   Result was garbled, when X had more than one column of marks.
   Fixed.

   o rMatClust, rVarGamma, rCauchy, rNeymanScott
   Result was a list, but not a 'solist', when nsim > 1.
   Fixed.

   o print.mppm, summary.mppm, subfits
   Crashed if a Poisson interaction was implied but not given explicitly.
   Fixed.

   o Kest
   Crashed if ratio=TRUE and the window was a rectangle.
   Fixed.

   o anova.ppm
   Crashed sometimes with message 'models were not all fitted
   to the same size of dataset'. 
   (This occurred if there were quadrature points with
   conditional intensity equal to zero in some models but not in all models.)
   Fixed.

   o vcov.kppm
   Occasionally ran out of memory.
   Fixed.

   o as.linim.linfun
   Erroneously converted the pixel values to numeric values.
   Fixed.

   o as.owin.layered
   Ignored layers with zero area.
   Fixed.

   o plot.ppm
   Paused the plot between frames even when there was only one frame.
   Fixed.

   o plot.layered
   Did not allocate space for legends of 'lpp' objects.
   Fixed.

   o plot.lpp
   Ignored symbolmap arguments like 'cex'
   and confused the arguments 'col' and 'cols'.
   Fixed.

   o plot.diagppm
   Ignored add=TRUE in some cases.
   Fixed.

   o iplot.layered
   Did not handle 'diagramobj' objects correctly.
   Fixed.

   o plot.yardstick
   Changed arguments.

      CHANGES IN spatstat VERSION 1.41-0

OVERVIEW

   o We thank Ahmed El-Gabbas, Ute Hahn, Aruna Jammalamadaka,
   Ian Renner, Brian Ripley, Torben Tvedebrink and Sasha Voss 
   for contributions.

   o Fixed a bug causing a segmentation fault.

   o Standard errors for kernel estimates of intensity.

   o Test for segregation.

   o Tessellations may now have marks.

   o Nested splitting.

   o More support for cluster models. Reorganised parametrisation.

   o Sparse data representation of linear networks.

   o More support for data on a linear network.

   o New datasets: 'spiders' and 'dendrite'.

   o Improvements and bug fixes.

   o spatstat no longer uses Fortran.

   o spatstat no longer depends on the package 'scatterplot3d'.

   o spatstat now imports (rather than 'suggests') the Matrix package.

   o Nickname: 'Team Australia'

NEW DATASETS

   o dendrite
   Dendritic spines on the dendrite network of a neuron.
   A point pattern on a linear network.
   Generously contributed by Aruna Jammalamadaka.

   o spiders
   Spider webs on the mortar lines of a brick wall.
   A point pattern on a linear network.
   Generously contributed by Sasha Voss.

NEW FUNCTIONS

   o segregation.test
   Test of spatial segregation of types in a multitype point pattern.

   o clusterfield, clusterkernel
   Compute the cluster kernel (offspring density) of a cluster process model,
   or compute the cluster field generated by superimposing copies 
   of the cluster kernel at specified locations.

   o clusterradius
   Compute the radius of the support of the offspring density
   of a cluster process model. 

   o as.linnet.psp
   Convert a line segment pattern to a linear network
   by guessing the connectivity using a distance threshold.

   o iplot.linnet, iplot.lpp
   Methods for interactive plotting 'iplot' for objects of class lpp and linnet.

   o Mathematical operations are now supported for pixel images
   on a linear network. See help(Math.linim)

   o dirichlet.network, delaunay.network
   The linear networks formed by the Dirichlet tessellation 
   and Delaunay triangulation.

   o dirichlet.edges
   The edges of the Dirichlet tessellation.

   o selfcut.psp
   Cut line segments where they cross each other.

   o vertices.linnet
   Extract the vertices (nodes) of the linear network.

   o vertexdegree
   Compute the degree of each vertex in a linear network.

   o pixellate.linnet
   Pixellate a linear network.

   o subset.hyperframe
   'subset' method for class 'hyperframe'.

   o head.hyperframe, tail.hyperframe
   'head' and 'tail' methods for hyperframes.

   o clickdist
   Measures the distance between two spatial locations clicked by the user.

   o solapply, anylapply
   wrappers for 'lapply' which return a list of class 'solist' or 'anylist'.

   o Kmark
   Weighted K-function. 
   Identical to 'markcorrint' and will eventually replace it.

   o marks.tess, marks<-.tess, unmark.tess:
   Extract or change the marks associated with the tiles of a tessellation.

   o quantess
   Quantile tessellation: divide space into pieces which contain
   equal amounts of 'stuff'.

   o nestsplit
   Nested split

   o integral
   New generic function for integrating functions,
   with methods for 'im', 'msr', 'linim' and 'linfun'.

   o selfcut.psp
   Cut line segments where they cross each other

   o as.function.im
   Convert a pixel image to a function(x,y).

   o as.linnet.linim
   Extract the linear network from a 'linim' object.

   o pool.fv, pool.anylist
   New methods for 'pool' 

   o Window.linnet
   Extract the two-dimensional window containing a linear network.

SIGNIFICANT USER-VISIBLE CHANGES

   o linnet, lpp
   A linear network can now be built in 'sparse matrix' form
   which requires much less memory. 

   o chicago
   The Chicago street crimes data are now stored in 'sparse matrix' form.
   To convert them to non-sparse form, use as.lpp(chicago, sparse=FALSE)

   o kppm
   The parametrisation of cluster models has been reorganised.
   The scale parameter is now always called 'scale'.
   Results should be backward-compatible.

   o cauchy.estK, cauchy.estpcf, matclust.estK, matclust.estpcf, 
   thomas.estK, thomas.estpcf, vargamma.estK, vargamma.estpcf
    The parametrisation of cluster models has been reorganised.
    The scale parameter is now always called 'scale'.
   
   o plot.kppm 
   Also plots the cluster kernel.

   o density.ppp
   New argument 'se' allows calculation of standard errors as well.

   o plot.pp3
   Now produces a genuine perspective view.
   New arguments control the eye position for the perspective view.

   o Emark, Vmark
   These functions can now work with multiple columns of marks.

   o pixellate.psp
   Can now count the number of segments that intersect each pixel, 
   instead of the total length of intersection.

   o linfun
   If  g = linfun(f, L),
   the function f will always be called as f(x,y,seg,tp, ...)
   It is no longer expected to handle the case where 'seg' and 'tp' are absent.
   The resulting function g can now be called as g(X) where X is an lpp object,
   or as g(x,y) or g(x,y,seg,tp) where x,y,seg,tp are coordinates.

   o tess
   New argument 'marks' allows marks to be associated with tiles.

   o anova.lppm
   Outdated argument 'override' has been removed.

   o split<-.ppp
   Preserves the original ordering of the data, if possible.

   o MultiHard, MultiStrauss, MultiStraussHard, HierStrauss
   Zero values in the interaction radii are now treated as NA.
   Improved handling of missing arguments.
   Printed output now respects options('width')

   o linearKinhom, linearKcross.inhom, linearKdot.inhom,
     linearpcfinhom, linearpcfcross.inhom, linearpcfdot.inhom
   If the intensity argument lambda, lambdaI, lambdaJ, lambdadot
   is a fitted point process model, the model is first updated
   by re-fitting it to the data, before computing the fitted intensity.

   o solutionset
   The expression will be evaluated using pixel arithmetic (Math.im)
   if it cannot be evaluated using eval.im.

   o to.grey
   Now uses better weights for the R, G, B channels.

   o rVarGamma
   Accelerated.

   o summary.mppm, print.mppm
   These functions now respect options('width') and spatstat.options('terse').

   o print.quadrattest
   Now respects options('width') and spatstat.options('terse').

   o print.pp3
   Now respects options('width')

   o print.lpp
   Now respects options('width') and options('digits').

   o print.owin, print.im, print.summary.owin, print.summary.im
   Now respect options('width').

   o nnmean
   Now yields a vector, instead of a 1-column matrix,
   when there is only a single column of marks.

   o pairdist.psp, crossdist.psp, nndist.psp
   The option 'method="Fortran"' is no longer supported.
   The default is 'method="C"'.
 
   o [.hyperframe:
   When a row of data is extracted with drop=TRUE, the result
   belongs to class 'anylist'.

   o installation of spatstat
   A Fortran compiler is no longer needed to compile spatstat from source.

   o hyperframe class
   The internal structure of hyperframes has changed slightly:
   columns of objects are now stored and returned as
   lists of class 'anylist' or 'solist'.
   There should be no change in behaviour.

   o datasets
   Internal format of the datasets 
   	    bdspots, bei, clmfires, demohyper, flu, gorillas, heather, 
	    Kovesi, murchison, osteo, pyramidal, waterstriders
   has changed slightly to use the classes 'anylist' and 'solist'.
   There should be no change in behaviour.

   o K3est
   New argument 'ratio'.

   o spatstat.options
   New option 'par.points3d' sets default arguments for plot.pp3. 

   o diagnose.ppm
   New arguments 'xlab', 'ylab', 'rlab' determine the labels
   in the 4-panel plot, and new argument 'outer' controls their position.
   The confusing default value for 'compute.sd' has been changed.

   o iplot.layered
   New argument 'visible' controls which layers are initially visible.

   o plot.lpp
   New argument 'show.window' controls whether to plot the containing window.
   
   o textstring
   Any number of spatial locations (x,y) can be specified,
   with a corresponding vector of text strings.

   o plot.hyperframe
   New argument 'mar' 

   o plot.linnet
   New argument 'do.plot'

   o summary.hyperframe
   Improved output.

   o eval.linim
   Improved scoping rules.

   o pixellate.owin
   Accelerated.

   o summary.linnet
   Now prints more information, and respects options('digits').

   o rmpoispp, rmpoint
   The vector of possible types of points will default to the 'names' vector
   of the argument 'lambda', 'n', or 'f' where appropriate.

   o rpoislpp
   Argument 'L' can be omitted when lambda is a 'linim' or 'linfun'

   o simulate.ppm, simulate.kppm, simulate.lppm, simulate.slrm
   New argument 'drop': if nsim = 1 and drop=TRUE, the result is a point pattern
   rather than a list containing one point pattern.

   o runifdisc, runifpoint, rpoint, rpoispp, rmpoint, rmpoispp, 
   rMaternI, rMaternII, rSSI, rPoissonCluster, rGaussPoisson,
   rstrat, rsyst, rcell, rthin, rNeymanScott, rMatClust, rThomas,
   rCauchy, rVarGamma
   New argument 'drop'

   o spatstat.options
   New option 'units.paren' controls the type of parenthesis
   enclosing the explanatory text about the unit of length,
   in print.ppm, plot.fv, etc.

   o closepairs, crosspairs
   New option: what="ijd" returns only the indices i, j and the distance d

   o rCauchy, rMatClust, rNeymanScott, rPoissonCluster, rThomas, rVarGamma
   Argument names have changed.

BUG FIXES

   o sumouter
   A segmentation fault could occur if any data were NA.
   Fixed.

   o simulate.kppm
   Simulation failed for log-Gaussian Cox processes (in simulate.kppm only) 
   with an error message from the RandomFields package.
   Fixed.

   o ppm,  predict.ppm, profilepl
   Crashed sometimes with message 
   "interaction evaluator did not return a matrix".
   Fixed.

   o lppm
   step() did not work correctly on 'lppm' objects.
   Fixed.

   o quadscheme
   If quadscheme() was called explicitly, with the stipulated number of tiles
   exceeding the number of dummy points given, then the quadrature weights 
   were sometimes vastly inflated - total quadrature weight was
   much larger than window area. Spotted by Ian Renner. 
   Fixed.   

   o predict.rhohat
   Result was incorrect for data on a non-rectangular window 
   (and a warning was issued about incorrect vector length).
   Fixed.

   o Math.im
   Unary operators did not work (e.g."-x")
   Fixed.
   
   o density.ppp
   Crashed when at="points" if the dataset had exactly 1 point.
   Fixed.

   o rSSI
   Crashed if nsim > 1.
   Fixed.

   o influence.ppm, leverage.ppm, dfbetas.ppm
   Crashed or issued a warning if any quadrature points had 
   conditional intensity zero under the model (negative infinite values
   of the sufficient statistic).
   Fixed.

   o clickppp, clickpoly
   Did not work correctly in the RStudio display device.
   Fixed.

   o Iest
   Ignored the arguments 'r' and 'eps'.
   Fixed.

   o markvario
   Result was garbled, when X had more than one column of marks.
   Fixed.

   o rMatClust, rVarGamma, rCauchy, rNeymanScott
   Result was a list, but not a 'solist', when nsim > 1.
   Fixed.

   o print.mppm, summary.mppm, subfits
   Crashed if a Poisson interaction was implied but not given explicitly.
   Fixed.

   o Kest
   Crashed if ratio=TRUE and the window was a rectangle.
   Fixed.

   o anova.ppm
   Crashed sometimes with message 'models were not all fitted
   to the same size of dataset'. 
   (This occurred if there were quadrature points with
   conditional intensity equal to zero in some models but not in all models.)
   Fixed.

   o vcov.kppm
   Occasionally ran out of memory.
   Fixed.

   o as.linim.linfun
   Erroneously converted the pixel values to numeric values.
   Fixed.

   o as.owin.layered
   Ignored layers with zero area.
   Fixed.

   o plot.ppm
   Paused the plot between frames even when there was only one frame.
   Fixed.

   o plot.layered
   Did not allocate space for legends of 'lpp' objects.
   Fixed.

   o plot.lpp
   Ignored symbolmap arguments like 'cex'
   and confused the arguments 'col' and 'cols'.
   Fixed.

   o plot.diagppm
   Ignored add=TRUE in some cases.
   Fixed.

   o iplot.layered
   Did not handle 'diagramobj' objects correctly.
   Fixed.

   o plot.yardstick
   Changed arguments.

	CHANGES IN spatstat VERSION 1.40-0

OVERVIEW

   o We thank Markus Herrmann, Peter Kovesi, Andrew Lister, 
   Enrique Miranda, Tuomas Rajala, Brian Ripley, Dominic Schuhmacher 
   and Maxime Woringer for contributions.

   o Important bug fixes.

   o Mathematical operators now apply to images.

   o Parametric estimates of relative risk from fitted point process models.

   o Standard errors for relative risk (parametric and non-parametric).

   o Kernel smoothing and rose diagrams for angular data.

   o Perceptually uniform colour maps. 

   o Hierarchical interactions for multitype patterns.

   o Hard core parameters in all interactions no longer need to be specified
     and will be estimated from data.

   o Improvements to analysis of deviance and model selection.

   o New datasets.

   o New vignette, summarising all datasets installed with spatstat.

   o Tests and diagnostics now include a Monte Carlo option.

   o Faster checking of large datasets.

   o Faster simulations.

   o Code for drawing diagrams (arrows, scale bars).

   o Version nickname: 'Do The Maths'

NEW DATASETS

   o bdspots
   Breakdown spots on microelectronic capacitor electrodes.
   Generously contributed by Prof Enrique Miranda.

   o Kovesi
   Colour maps with perceptually uniform contrast.
   Generously contributed by Peter Kovesi.

NEW FUNCTIONS

   o Mathematical operations are now supported for images.
   For example:   alpha <- atan(bei.extra$grad) * 180/pi
   See help(Math.im)

   o relrisk.ppm
   Spatially-varying probabilities of different types of points
   predicted by a fitted point process model.

   o circdensity
   Kernel density estimate for angular data

   o rose
   Rose diagram (rose of directions) for angular data

   o nnorient
   Nearest neighbour orientation distribution.

   o AIC.ppm
   Calculate AIC of a Gibbs model using Takeuchi's rule.

   o interp.colours
   Interpolate a sequence of colour values.

   o anyDuplicated.ppp, anyDuplicated.ppx
   Fast replacements for any(duplicated(x)) for point patterns.

   o textstring, onearrow, yardstick
   Objects representing a text string, an arrow, or a scale bar,
   for use in drawing spatial diagrams.

   o plot.imlist, image.imlist, contour.imlist
   Methods for the new class 'imlist'

   o [<-.layered,  [[<-.layered
   More support for class 'layered'

SIGNIFICANT USER-VISIBLE CHANGES

   o (vignettes)
   New vignette 'datasets' summarises all the datasets installed
   with the spatstat package.

   o relrisk
   The function relrisk is now generic, with methods for ppp and ppm.
   New argument 'relative' specifies whether to calculate the relative risk
   or the absolute probability of each type of point.
   New argument 'se' specifies whether to calculate standard errors.

   o plot.im
   The default colour map for plotting images,
   specified by spatstat.options('image.colfun'), 
   has been changed to a perceptually uniform map.

   o DiggleGratton, Fiksel, MultiHard, MultiStraussHard
   The hard core distance parameters in these models
   can now be omitted by the user, and will be estimated automatically
   from data (by the 'self-starting' feature of interactions).
   This was already true of Hardcore and StraussHard.

   o Hybrid
   Hybrid models now apply the 'self-starting' feature
   to each component model. 

   o anova.ppm
   Can now reconcile models fitted using different dummy points,
   different values of 'rbord', different values of 'use.gam', etc. 

   o profilepl
   New argument 'aic' makes it possible to optimise the parameters 
   by minimising AIC.

   o profilepl
   No longer requires values for parameters which are 'optional' 
   (such as the hard core distance).

   o rmh, simulate.ppm, rmh.ppm, rmh.default
   The Metropolis-Hastings algorithm now starts by deleting any points
   in the initial state that are 'illegal' (i.e. whose conditional intensity
   is equal to zero). This ensures that the result of rmh 
   never contains illegal points.

   o runifpoint, rpoispp, rStrauss, rHardcore, rStraussHard,
   rDiggleGratton, rDGS, runifdisc, rpoint, rMaternI, rMaternII, rSSI,
   rPoissonCluster, rGaussPoisson, rstrat, rsyst, rcell, rthin, rjitter,
   rNeymanScott, rMatClust, rThomas, rCauchy, rVarGamma, rmpoint, rmpoispp, 
   runifpointOnLines, rpoisppOnLines, runiflpp, rpoislpp, runifpointx, 
   rpoisppx, runifpoint3, rpoispp3
      These random point pattern generators now have an argument 'nsim'
      specifying the number of simulated realisations to be generated.

   o pairorient
   New argument 'cumulative'.
   New algorithm to compute kernel estimate of probability density.
   Default behaviour changed.
   Argument 'units' has been renamed 'unit' for consistency.
   Labels and descriptions of columns have been corrected.

   o predict.ppm
   New syntax (backward-compatible).
   New argument 'se' replaces option 'type="se"'.
   Old argument 'total' is deprecated: use 'window' and set 'type="count"'.
   
   o cdf.test
   The methods for class 'ppm' and 'lppm' now handle Gibbs models
   and perform a Monte Carlo test in this case.

   o lurking, diagnose.ppm
   Lurking variable plot can now include simulation envelopes.

   o rmh.ppm
   New argument 'w' determines the window in which the simulated pattern
   is generated.

   o ppp
   Accelerated.

   o Gcom, Gres
   When conditional=TRUE and restrict=TRUE, the Hanisch estimate
   was not calculated exactly as described in Appendix E.1 of 
   Baddeley, Rubak and Moller (2011). The intensity was estimated 
   on the full window rather than the eroded window.
   Fixed.   

   o step, drop1, add1, extractAIC
   The AIC of a Gibbs model is now calculated using Takeuchi's rule
   for the degrees of freedom.

   o model.matrix.ppm, model.matrix.kppm
   New argument 'Q' allows prediction at any desired locations.

   o vcov.ppm
   New argument 'fine' gives more control over computation.

   o predict.ppm
   For multitype models, when the result is a list of images,
   the names of list entries are now identical to the mark levels
   (e.g. "hickory" instead of "markhickory")

   o print.slrm
   Output now respects options('width')

   o image.listof
   New argument 'ribmar' controls margin space around the ribbon
   when equal.ribbon=TRUE.

   o integral.im
   New argument 'domain' specifies the domain of integration.

   o plot.fasp
   New argument 'transpose' allows rows and columns to be exchanged.

   o plot.im
   The list 'ribargs' can now include the parameter 'labels'.

   o rmh, rpoint, rpoispp, rmpoint, rmpoispp
   Accelerated, for inhomogeneous processes.

   o stienen
   Now recognises the parameter 'lwd'. 

   o suffstat
   Accelerated (also affects ppm with method='ho').

   o Poisson, AreaInter, BadGey, Concom, DiggleGatesStibbard, DiggleGratton,
   Fiksel, Geyer, Hardcore, Hybrid, LennardJones, MultiHard, MultiStrauss,
   MultiStraussHard, OrdThresh, Ord, PairPiece, Pairwise, SatPiece, 
   Saturated, Softcore, Strauss, StraussHard, Triplets
      These functions can now be printed (by typing the function name)
      to give a sensible description of the required syntax.

   o fitin
   A plot of the fitted interpoint interaction of a point process model
   e.g. plot(fitin(ppm(swedishpines ~ 1, Strauss(9))))
   now shows the unit of length on the x-axis.
   
   o fitin
   Plots of the fitted interpoint interaction are now possible
   for some higher-order interactions such as Geyer and AreaInter.

   o anova.ppm
   New argument 'warn' to suppress warnings.

   o rmhmodel.ppm
   Argument 'win' renamed 'w' for consistency with other functions.

   o print.ppm
   Printed output for the fitted regular parameters
   now respects options('digits').

   o print.ppm, print.summary.ppm
   Output now respects options('width') and spatstat.options('terse')

   o print.ppm
   By default, standard errors are not printed 
   for a model fitted with method="logi" (due to computational load)

   o plot.profilepl
   Now recognises 'lty', 'lwd', 'col' etc

   o vesicles, gorillas
   Some of the raw data files for these datasets are also installed in spatstat
   for demonstration and training purposes. 

BUG FIXES

   o rmh, rmh.ppm, rmh.default, simulate.ppm
   The result of simulating a model with a hard core
   did not necessarily respect the hard core constraint,
   and simulation of a model with strong inhibition
   did not necessarily converge. 
   This only happened if the first order trend was large,
   the starting state (n.start or x.start) was not given,
   and the number of iterations (nrep) was not very large.
   It occurred because of a poor choice for the default starting state.
   Bug was present since about 2010.
   Fixed.
   
   o markcorrint
   Results were completely incorrect.
   Bug introduced in spatstat 1.39-0, october 2014.
   Fixed.

   o Kinhom
   Ignored argument 'reciplambda2' in some cases.
   Bug introduced in spatstat 1.39-0, october 2014.
   Fixed.

   o relrisk
   When at="pixels", a small fraction of pixel values were sometimes
   wildly inaccurate, due to numerical errors. This affected the 
   range of values in the result, and therefore the appearance of plots.
   Fixed.

   o model.images
   Crashed if the model was multitype.
   Fixed.

   o profilepl
   Crashed in some cases when the interaction was multitype.
   [Spotted by Andrew Lister.]
   Fixed.

   o profilepl
   Crashed if the model involved covariates that were not
   given in a 'data' argument.
   Fixed.

   o envelope.ppm
   Crashed if global=TRUE and savefuns=TRUE.
   Fixed.

   o setminus.owin
   Crashed if the result was empty and the input was polygonal.
   Fixed.

   o predict.ppm
   Crashed sometimes when type="cif" and ngrid was very large.
   Fixed.

   o pixelquad
   If X was a multitype point pattern, the result was mangled.
   Fixed.

   o relrisk
   Did not accept a character string value for the argument 'case'.
   Fixed.

   o intensity.ppm
   Format of result was incorrect for ppm(Y ~ 1) where Y is multitype.
   Fixed.

   o $<-.hyperframe
   Columns containing character values were converted to factors.
   Fixed.

   o clickppp
   Sometimes filled the window in solid black colour..
   Fixed.

   o plot.psp
   Ignored 'show.all' in some cases.
   Fixed.

   o plot.ppp
   Warned about NA values amongst the marks, even if there were no NA's
   in the column(s) of marks selected by the argument 'which.marks'.
   Fixed.

   o stienen
   Did not suppress the border circles when border=FALSE.
   Fixed.

	CHANGES IN spatstat VERSION 1.39-1

OVERVIEW

   o Urgent bug fix.

   o We thank Suman Rakshit and Brian Ripley for contributions.

BUG FIXES

   o bdry.mask, convexhull
   In R-devel only, these functions could return an empty window,
   causing errors in other packages.
   [Spotted by Brian Ripley.]
   Fixed.

   o project2segment
   An error occurred if any line segments had length zero.
   [Spotted by Suman Rakshit.]
   Fixed.


	CHANGES IN spatstat VERSION 1.39-0

OVERVIEW

   o We thank Shane Frank, Shaaban Ghalandarayeshi, Ute Hahn, 
     Mahdieh Khanmohammadi, Nicoletta Nava, Jens Randel Nyengaard,
     Sebastian Schutte, Rasmus Waagepetersen and Carl G. Witthoft 
     for contributions.

   o ANOVA extended to Gibbs models.

   o Improved algorithm for locally-scaled K-function.

   o Leave-one-out calculation of fitted values in ppm objects.

   o New dataset: presynaptic vesicles.

   o Geometrical operations with windows and images.

   o More edge corrections for K-function.

   o Improved handling and plotting of 'fv' objects.

   o Utilities for perspective views of surfaces.

   o New classes 'anylist', 'solist' will ultimately replace 'listof'.

   o Bug fixes.

   o Version nickname: 'Smoke and Mirrors'

NEW DATASETS

   o vesicles
   Synaptic vesicles 
   (includes raw data files for training purposes)

NEW CLASSES

   o anylist
   List of objects. 
   (A replacement for 'listof')

   o solist
   List of two-dimensional spatial objects.
   (A replacement for some uses of 'listof')

NEW FUNCTIONS

   o perspPoints, perspLines, perspSegments, perspContour
   Draw points and lines on a surface, as seen in perspective view.

   o hopskel.test
   Hopkins-Skellam test of CSR

   o project2set
   For each data point in a point pattern X, find the nearest
   spatial location in a given window W.

   o stienen, stienenset
   Stienen diagrams

   o dirichlet.vertices
   Vertices of the Dirichlet tessellation

   o discs 
   Union of discs.
   Given a point pattern dataset recording the locations and diameters
   of objects, find the region covered by the objects.

   o increment.fv
   Increments of a summary function: g(x) = f(x+h)-f(x-h).

   o rotmean
   Rotational average of pixel values in an image

   o fardist
   Distance from each pixel/data point to farthest part of window boundary

   o circumradius.owin
   Circumradius of a window

   o rmax.Trans, rmax.Ripley
   Compute the maximum distance 'r' for which the 
   translation edge correction and isotropic edge correction   
   are valid.

   o is.grey
   Determines whether a colour value is a shade of grey.

   o harmonise
   Convert several objects of the same class to a common format.
   (New generic function with existing methods harmonise.im and harmonise.fv)

   o area
   New generic function, with methods for 'owin' and 'default'.

   o Fhazard
   Hazard rate of empty space function

   o anylist, as.anylist, [.anylist, [<-.anylist, print.anylist, summary.anylist
   Support for new class 'anylist'

   o solist, as.solist, [.solist, [<-.solist, print.solist, summary.solist
   Support for new class 'solist'

   o plot.anylist, plot.solist
   Plot methods for the classes 'anylist' and 'solist'
   (Currently identical to 'plot.listof')

SIGNIFICANT USER-VISIBLE CHANGES

   o anova.ppm
   Now applies to Gibbs models as well as Poisson models,
   using adjusted composite likelihood ratio test statistic.

   o persp.im
   If visible=TRUE, the algorithm will also calculate which pixels of x
   are visible in the perspective view. This is useful for drawing
   points or lines on a perspective surface.

   o Kscaled
   Improved algorithm [thanks to Ute Hahn.]
   New arguments 'renormalise' and 'normpower' allow renormalisation
   of intensity, similar to Kinhom.

   o Kest
   New option: correction="rigid" computes the rigid motion correction.

   o pairwise interactions 
   Fitted parameters and other calculations for pairwise interaction models
   DiggleGatesStibbard, DiggleGratton, Fiksel, Geyer, Strauss 
   may change slightly due to a change in handling numerical rounding effects.

   o eval.fv
   Functions no longer need to have exactly the same sequence of 'r' values.
   They will now be made compatible using 'harmonise.fv'.

   o fitted.ppm
   New argument 'leaveoneout' allows leave-one-out calculation
   of fitted intensity at original data points.

   o Kinhom, Linhom
   New argument 'leaveoneout' specifies whether the leave-one-out rule
   should be applied when calculating the fitted intensities. 
   
   o crosspaircounts
   Results may change slightly due to a change in handling numerical 
   rounding effects.

   o Fest, Gest
   New argument 'domain' supports bootstrap methods.
 
   o plot.fv
   New argument 'mathfont' determines the font (e.g. plain, italic, bold)
   for mathematical expressions on the axes and in the legend.
   Defaults to italic.

   o scanpp 
   Upgraded to handle multiple columns of mark data.

   o circumradius
   The function 'circumradius' is now generic, with methods
   for the classes 'owin' and 'linnet'.

   o edge.Trans
   New argument 'give.rmax' 

   o fvnames, plot.fv
   The symbol '.a' is now recognised. It stands for 'all function values'.

   o as.function.fv
   Argument 'extrapolate' can have length 1 or 2.

   o varblock
   New argument 'confidence' determines the confidence level.

   o $<-.fv
   This can now be used to add an extra column to an 'fv' object
   (previously it refused).

   o minnndist, maxnndist
   New argument 'positive'. If TRUE, coincident points are ignored:
   the nearest-neighbour distance of a point is the distance to the
   nearest point that does not coincide with the current point.

   o plot.fv
   Improved handling of 'shade' argument.

   o Kmeasure
   Now passes '...' arguments to as.mask()

   o Ksector
   Now allows start < 0.  
   New arguments 'units' and 'domain'.

   o pairorient
   New arguments 'units' and 'domain'.

   o eroded.areas
   New argument 'subset'

   o disc
   New argument 'delta' 

   o plot.plotppm
   New argument 'pppargs'

   o harmonise.fv, harmonise.im
   These are now methods for the new generic 'harmonise'

   o Fest, Gest
   These functions now also compute the theoretical value of hazard
   for a Poisson process, if correction = "km".

   o with.fv
   Improved mathematical labels.

   o Gfox, Jfox
   Improved mathematical labels.

   o area.owin
   This function is now a method for the new generic 'area'

   o edges
   Default for argument 'check' changed to FALSE.

BUG FIXES

   o varblock
   Calculations were incorrect if more than one column of 
   edge corrections was computed. 
   [Bug introduced in spatstat 1.21-1, november 2010.]
   Fixed.

   o varblock
   Crashed if one of the quadrats contained no data points.
   Fixed.

   o lohboot
   Interval was calculated wrongly when global=TRUE and fun="Lest" or "Linhom".
   Fixed.

   o nnmark
   Crashed when at="points" if there was only a single column of marks.
   [Spotted by Shane Frank.]
   Fixed.

   o plot.msr
   Some elements of the plot were omitted or cut off.
   Fixed.

   o plot.msr
   Did not work with 'equal.scales=TRUE'.
   Fixed.

   o plot.msr, augment.msr
   Crashed if every data point was duplicated.
   Fixed.

   o as.im.owin
   Crashed if X was a 1 x 1 pixel array.
   Fixed.

   o owin
   Coordinates of polygon data were altered slightly when fix=TRUE. 
   [Spotted by Carl Witthoft.]
   Fixed.
   
   o objects of class 'fv'
   Assigning a new value to names(x) or colnames(x) or dimnames(x)
   would cause the internal data format to become corrupted.
   Fixed.

   o to.grey, complementarycolour
   Did not work properly on 'colourmap' objects.
   Fixed.

   o Kest
   Ignored argument 'var.approx' if the window was a rectangle.
   Fixed.

   o rmh.ppm, rmhmodel.ppm
   Ignored the argument 'new.coef'.
   [Spotted by Sebastian Schutte]
   Fixed.

   o as.function.fv
   The meanings of 'extrapolate=TRUE' and 'extrapolate=FALSE' were swapped.
   Fixed.

   o varblock
   Handled the case 'fun=Lest' incorrectly.
   Fixed.

   o [.fv
   Sometimes garbled the internal data format, causing plot.fv to crash.
   Fixed.

   o range.fv
   Sometimes returned NA even when na.rm=TRUE.
   Fixed.

   o Fest
   Argument 'eps' was not interpreted correctly.
   Fixed.

   o plot.fv
   Argument 'lwd' was not passed to legend()

   o flipxy.owin
   Sometimes deleted the name of the unit of length.
   Fixed.

	CHANGES IN spatstat VERSION 1.38-1

OVERVIEW

   o We thank Ute Hahn and Xavier Raynaud for contributions.

   o Urgent Bug Fixes.

   o Nickname: 'Le Hardi'

NEW FUNCTIONS

   o "[<-.fv", "$<-.fv"
   Subset replacement methods for 'fv' objects.

SIGNIFICANT USER-VISIBLE CHANGES

   o clarkevans.test
   Simulations are now performed with a fixed number of points.

   o plot.owin, plot.ppp, plot.psp, plot.im
   The default size of the outer margin of white space has been
   reduced. 

   o dclf.test
   Improved information in printed output.

BUG FIXES

   o update.ppm
   Results were incorrect in several cases.
   [Spotted by Xavier Raynaud.]
   Bug introduced in spatstat 1.38-0.
   Fixed.

   o Kinhom, Linhom
   Calculations were incorrect if 'lambda' was a fitted point process model.
   [Spotted by Xavier Raynaud.]
   Bug introduced in spatstat 1.38-0.
   Fixed.

   o envelope.envelope
   Ignored the arguments 'global' and 'VARIANCE'.
   Fixed.

   o fv objects
   If 'f' was an object of class 'fv', then an assignment like f$name <- NULL
   mangled the internal format of the object 'f', leading to errors
   in print.fv and plot.fv.
   [Spotted by Ute Hahn.]
   Fixed.

   o split.ppp
   split(X, A) where A is a rectangular tessellation,
   produced errors if the window of 'A' did not include the window of 'X'.
   [Spotted by Ute Hahn.]
   Fixed.

   o names<-.hyperframe
   Mangled the internal format.
   [Spotted by Ute Hahn.]
   Fixed.
   
   o plot.fv
   y axis label was incorrect in some cases when the 'fv' object
   had only a single column of function values.
   [Spotted by Ute Hahn.]
   Fixed.

   
	CHANGES IN spatstat VERSION 1.38-0

OVERVIEW

   o We thank Malissa Baddeley, Colin Beale, Oscar Garcia, Daniel Esser, 
     David Ford, Eric Gilleland, Andrew Hardegen, Philipp Hunziker, 
     Abdollah Jalilian, Tom Lawrence, Lore De Middeleer, Robin Milne, 
     Mike Porter, Suman Rakshit, Pablo Ramon, Jason Rudokas, 
     Christopher Ryan, Dominic Schuhmacher, Medha Uppala 
     and Rasmus Waagepetersen for contributions.

   o spatstat now Requires the package 'goftest' 
     and Suggests the package 'Matrix'.

   o New dataset: 'sporophores'

   o Palm likelihood method for fitting cluster processes and Cox processes.

   o Quasi-likelihood and weighted composite likelihood methods
     for estimating trend in cluster processes and Cox processes.

   o Further extensions to model formulas in ppm and kppm.

   o Faster variance calculations for ppm objects.

   o One-sided tests and one-sided envelopes of summary functions.

   o Cramer-Von Mises and Anderson-Darling tests of spatial distribution.

   o Cressie-Read test statistic in quadrat counting tests.

   o Spatial cumulative distribution functions.

   o Faster algorithm for point pattern matching.

   o Improvements to plots.

   o Increased support for envelopes.

   o New generic functions 'Window', 'Frame' and 'domain'.

   o Directional K-function and directional distribution.

   o Raster calculations accelerated.

   o Summary functions accelerated.

   o Many improvements and bug fixes.

   o Version nickname: 'Wicked Plot'

NEW DATASETS

   o sporophores
   Spatial pattern of three species of mycorrhizal fungi around a tree.
   [Contributed by E. David Ford.]

NEW FUNCTIONS

   o improve.kppm
   Re-estimate the trend in a kppm (cluster or Cox) model
   using quasi-likelihood or weighted first-order composite likelihood.
   [Contributed by Abdollah Jalilian and Rasmus Waagepetersen.]

   o Window, Window<-
   Generic functions to extract and change the window of a spatial object
   in two dimensions. Methods for ppp, psp, im, and many others.

   o Frame, Frame<-
   Generic functions to extract and change the containing rectangle ('frame')
   of a spatial object in two dimensions. 

   o domain
   Generic function to extract the spatial domain of a spatial object
   in any number of dimensions. 

   o Ksector
   Directional version of the K-function.

   o pairorient
   Point pair orientation distribution.

   o spatialcdf
   Compute the spatial cumulative distribution of a spatial covariate,
   optionally using spatially-varying weights.

   o cdf.test 
   [Supersedes 'kstest'.]
   Test of goodness-of-fit of a Poisson point process model.
   The observed and predicted distributions of the values of a 
   spatial covariate are compared using either the
   Kolmogorov-Smirnov, Cramer-Von Mises or Anderson-Darling test.

   o berman.test
   Replaces 'bermantest'.

   o harmonise.fv
   Make several functions compatible.

   o simulate.lppm
   Simulate a fitted point process model on a linear network.

   o subset.ppp, subset.lpp, subset.pp3, subset.ppx
   Methods for 'subset', for point patterns.

   o closepairs.pp3, crosspairs.pp3
   Low-level functions to find all close pairs of points in three dimensions

   o volume.linnet
   Method for the generic 'volume'. Returns the length of the linear network.

   o padimage
   Pad the border of a pixel image.
 
   o as.layered
   Convert spatial data to a layered object.

   o panel.contour, panel.image, panel.histogram
   Panel functions for 'pairs' plots.

   o range.fv, min.fv, max.fv
   Range, minimum and maximum of function values.

SIGNIFICANT USER-VISIBLE CHANGES

   o ppm.formula
   The left hand side of the formula can now be the name of 
   an object in the list 'data', or an expression involving such objects.

   o ppm
   The right hand side of the formula can now include 
   the symbol '.' representing all covariates in the list 'data'.

   o ppm
   New argument 'subset' makes it possible to fit the model
   in a subset of the spatial domain defined by an expression.

   o kppm
   New option: method="palm", will fit the model by maximising Palm likelihood.

   o pppdist
   Substantially accelerated. 
   New argument 'auction' controls choice of algorithm.

   o rhohat
   New arguments 'weights' and 'horvitz' for weighted calculations.

   o persp.im
   Surface heights and colours can now be controlled by different images.
   Option to draw a grey apron around the sides of the perspective plot. 
   Return value has a new attribute 'expand'.

   o plot.listof
   New arguments 'halign' and 'valign' give improved control
   over the alignment of panels.

   o plot.listof
   If all components of the list are objects of class 'fv' 
   representing functions, then if equal.scales=TRUE, these
   functions will all be plotted with the same axes 
   (i.e. the same xlim and the same ylim).

   o envelope
   The argument 'transform' is now processed by 'with.fv'
   giving more options, such as 'transform=expression(. - r)'

   o envelope, dclf.test, mad.test
   One-sided tests and one-sided envelopes can now be produced, 
   by specifying the argument 'alternative'.

   o dclf.test, mad.test
   A pointwise test at fixed distance 'r' can now be performed
   by setting rinterval = c(r,r).

   o envelope
   New arguments 'fix.n' and 'fix.marks' for envelope.ppp and envelope.ppm
   make it easy to generate simulated patterns conditional on the
   total number of points, or on the number of points of each type.

   o quadrat.test
   Can now calculate the Cressie-Read test statistic
   instead of the Pearson X2 statistic.

   o Kres, Gres, Kcom, Gcom, psst, psstA, psstG
   New argument 'model' makes it easier to generate simulation envelopes
   of the residual summary functions.

   o layered, plot.layered
   The layer plot arguments can include the argument '.plot'
   specifying a function to perform the plotting instead of the
   generic 'plot'.

   o deriv.fv
   New arguments make it possible to differentiate a periodic function.

   o ppm
   Argument 'data' or 'covariates' can now include entries
   which are not spatial covariates, provided they do not appear 
   in the model formula.

   o closepairs, crosspairs
   These functions are now generic, with methods for 'ppp' and 'pp3'

   o rLGCP
   Updated to conform to new usage of RandomFields package.
   Argument syntax has changed.
   Now allows control over pixel resolution.

   o bw.diggle
   New arguments 'correction' and 'hmax' for controlling the calculation.

   o predict.lppm
   New argument 'new.coef' for computing predictions with a 
   different vector of model coefficients.

   o predict.ppm
   If 'locations' is a pixel image, its pixels determine the
   spatial locations for prediction.

   o cut.ppp
   Argument 'z' can now be a window.

   o split.ppp
   Argument 'f' can now be a window.

   o print.ppm, summary.ppm, coef.summary.ppm
   The table of parameter estimates, standard errors and confidence intervals
   now also includes the value of the (signed square root) Wald test statistic.

   o plot.im
   Now automatically detects problems in some Windows graphics displays
   and tries to avoid them.

   o plot.im
   The position of axis tick marks alongside the colour ribbon
   can now be controlled using the parameter 'at' in the argument 'ribargs'.

   o plot.ppp
   Can now plot numeric marks using characters chosen by 'pch' or 'chars'
   with size determined by mark value.

   o plot.ppp
   New argument 'meansize' for controlling mark scale.

   o hsvim, rgbim
   New argument 'autoscale' causes automatic scaling of colour channel values.

   o plot.ppp
   If type='n', a legend is now displayed when x is a marked point pattern.

   o whist
   Accelerated by a factor of 5.

   o Fest, Jest
   Accelerated by a factor of 2 to 3.

   o fryplot
   Accelerated.
   Now displays a legend if the point pattern is marked.
   Now handles numerical marks nicely.
   New argument 'axes'.

   o frypoints
   Accelerated.
   New arguments 'to', 'from' and 'dmax'.

   o duplicated.ppp
   New option: rule = 'unmark'

   o rjitter
   Argument 'radius' now has a default.

   o Smooth.msr
   New argument 'drop'

   o LambertW
   Now handles NA and infinite values.

   o update.ppm
   Now handles formulae with a left-hand side.

   o raster.x, raster.y, raster.xy
   These functions can now handle images, as well as masks.

   o Smooth.ppp
   If the mark values are exactly constant, the resulting smoothed values
   are now exactly constant.

   o eval.im, eval.fv, eval.fasp
   Argument 'envir' can now be a list, instead of an environment.

   o plot.ppp
   The printout (of the resulting symbol map object)
   now displays the numerical value of the mark scale.

   o with.fv
   Improved mathematical labels.

   o plot.fv
   Improved mathematical labels on x axis.

   o ppm
   Improved error messages.

   o vcov.ppm
   Computations greatly accelerated for Hybrid interactions
   and for Area-interaction models.

   o vcov.kppm
   Computations greatly accelerated (when fast=TRUE)   

   o interp.im
   Argument 'x' can now be a point pattern.

   o pool.envelope
   Improved handling of text information.

   o miplot
   Improved layout.

   o print.summary.ppp
   Improved layout. 
   Now respects spatstat.options('terse')

   o print.profilepl
   Improved layout. 
   Now respects spatstat.options('terse')

   o anova.ppm
   Now respects spatstat.options('terse')

   o print.fv, print.envelope
   Now respect spatstat.options('terse') and options('width')
   
   o summary.envelope
   Now respects options('width')
   
   o kstest, bermantest
   These functions will soon be Deprecated.
   They are retained only for backward compatibility.

BUG FIXES

   o vcov.ppm
   Sometimes gave wrong answers for Poisson models fitted by method='logi'.
   Fixed.

   o unnormdensity
   If weights were missing, the density was normalised,
   contrary to the documentation.
   Fixed.

   o logLik.ppm, anova.ppm, AIC
   For models fitted by 'ippm', the number of degrees of freedom was incorrect.
   Fixed.

   o im.apply
   Pixels outside the window were not assigned the value NA as they should.
   Fixed.

   o pixellate.owin
   Crashed, unpredictably, if the pixel raster had unequal numbers
   of rows and columns.
   [Spotted by Rasmus Waagepetersen.]
   Fixed.

   o vcov.ppm
   Crashed for pairwise interaction models fitted by method="logi".
   Fixed.

   o predict.ppm
   Crashed for models fitted by method="logi"
   if the model included external covariates.
   Fixed.

   o predict.ppm
   Crashed if the argument 'covariates' or 'data' in the original call to 'ppm'
   included entries that were not spatial covariates. [These entries were
   ignored by ppm but caused predict.ppm to crash.]
   Fixed.

   o simulate.kppm, rNeymanScott, rThomas, rMatClust
   Crashed randomly when simulating an inhomogeneous model.
   [Spotted by Philipp Hunziker.]
   Fixed.
   
   o bw.diggle
   In some extreme cases, generated an error message
   about `NaN values in Foreign function call.'
   [Spotted by Colin Beale.]
   Fixed.

   o textureplot
   Crashed if 'spacing' was too large.
   Fixed.

   o superimpose.psp
   Crashed if the result was empty.
   Fixed.

   o istat
   Crashed with an error message about 'vars'.
   Fixed.

   o dirichlet, delaunay, delaunay.distance
   Crashed in rare cases due to a problem in package 'deldir'. 
   [Spotted by Pierre Legendre.]
   Fixed.

   o rgbim, hsvim
   Crashed if any argument was constant.
   Fixed.

   o scaletointerval
   Crashed if x was constant.
   Fixed.

   o linnet, [.linnet
   Crashed if the result contained only a single vertex.
   [Spotted by Daniel Esser.]
   Fixed.

   o plot.fv
   If some of the function values were NA,
   they were replaced by fictitious values
   (by linearly interpolating).
   Fixed.

   o crossdist.ppp
   Ignored argument 'squared' if periodic=FALSE.
   [Spotted by Mike Porter.]
   Fixed.

   o marks<-.ppp
   Ignored argument 'drop'.
   [Spotted by Oscar Garcia.]
   Fixed.
 
   o update.ppm
   Sometimes did not respect the argument 'use.internal'.
   Fixed.

   o plot.rhohat
   Did not respect the argument 'limitsonly'.
   Fixed.

   o contour.im
   Argument 'axes' defaulted to TRUE, but FALSE was intended.
   Fixed.

   o print.hyperframe, as.data.frame.hyperframe
   Column names were mangled if the hyperframe had a single row.
   Fixed.

   o as.psp.data.frame
   Generated a warning about partially-matched names in a data frame.
   [Spotted by Eric Gilleland.]
   Fixed.

   o plot.leverage.ppm
   Generated a warning from 'contour.default'
   if the leverage function was constant.
   Fixed.

   o plot.diagppm
   Issued warnings about unrecognised graphics parameters.
   Fixed.

   o update.symbolmap
   Discarded information about the range of input values.
   Fixed.

   o plot.fv
   Label for y axis was garbled, if argument 'shade' was given.
   Fixed.

   o plot.ppp
   The legend was sometimes plotted when it should not have been 
   (e.g. when add=TRUE).
   Fixed.

   o plot.listof, plot.im
   In an array of plots, containing both images and other spatial objects,
   the titles of the panels were not correctly aligned.
   Fixed.

   o plot.tess, plot.quadratcount
   Ignored arguments like 'cex.main'.
   Fixed.

   o iplot
   Navigation buttons (Left, Right, Up, Down, Zoom In, Zoom Out)
   did not immediately refresh the plot.
   Fixed.

   o iplot.layered
   Reported an error 'invalid argument type' if all layers were deselected.
   Fixed.

	CHANGES IN spatstat VERSION 1.37-0

OVERVIEW

   o Ege Rubak is now a joint author of spatstat. 

   o We thank Peter Forbes, Tom Lawrence and Mikko Vihtakari for contributions.

   o Spatstat now exceeds 100,000 lines of code.

   o New syntax for point process models (ppm, kppm, lppm)
     equivalent to syntax of lm, glm, ...

   o Covariates in ppm and kppm can now be tessellations.

   o Confidence intervals and prediction intervals for fitted models.

   o Quasirandom point patterns and sequences.

   o Plots using texture fill.

   o Support for mappings from data to graphical symbols and textures.

   o Automatic re-fitting of model in Ginhom, Kinhom, Finhom, Jinhom.

   o Support for Mixed Poisson distribution.

   o Interpretation of mark scale parameters has changed in plot.ppp

   o Syntax of multitype interactions (eg MultiStrauss) has changed.

   o Bug fix in Metropolis-Hastings simulation of 'StraussHard' models

   o Changed default behaviour of perfect simulation algorithms.

   o Improvements to layout of text output.

   o Version nickname: 'Model Prisoner'

NEW CLASSES

   o symbolmap
   An object of class 'symbolmap' represents a mapping
   from data to graphical symbols

   o texturemap
   An object of class 'texturemap' represents a mapping
   from data to graphical textures.

NEW FUNCTIONS

   o split.hyperframe, split<-.hyperframe
   methods for split and split<- for hyperframes.

   o dmixpois, pmixpois, qmixpois, rmixpois
   (log-)normal mixture of Poisson distributions.

   o vdCorput, Halton, Hammersley, rQuasi
   quasirandom sequences and quasirandom point patterns.

   o Smoothfun
   create a function(x,y) equivalent to the result of Smooth.ppp

   o minnndist, maxnndist
   Faster ways to compute min(nndist(X)), max(nndist(X))

   o add.texture
   Draw a simple texture inside a specified region.

   o textureplot
   Display a factor-valued pixel image using texture fill.

   o texturemap
   Create a texture map

   o plot.texturemap
   Plot a texture map in the style of a legend
   
   o symbolmap
   Create a symbol map

   o update.symbolmap
   Modify a symbol map

   o invoke.symbolmap
   Apply symbol map to data values, and plot them

   o plot.symbolmap 
   Plot the symbol map in the style of a legend

   o as.owin.boxx
   Converts a 'boxx' to an 'owin' if possible.

   o ellipse
   Create an elliptical window.

   o clickbox
   Interactively specify a rectangle, by point-and-click on a graphics device.

   o complementarycolour
   Compute the complementary colour value of a given colour value,
   or the complementary colour map of a given colour map.

   o gauss.hermite
   Gauss-Hermite quadrature approximation to the expectation
   of any function of a normally-distributed random variable.	

   o boundingbox
   Generic function, replaces bounding.box

   o edges
   Extract boundary edges of a window. 
   Replaces and extends 'as.psp.owin'

   o pixelcentres
   Extract centres of pixels as a point pattern.

SIGNIFICANT USER-VISIBLE CHANGES

   o ppm, kppm, lppm
   NEW SYNTAX FOR POINT PROCESS MODELS
   The model-fitting functions 'ppm', 'kppm' and 'lppm' now accept
   a syntax similar to 'lm' or 'glm', for example  ppm(X ~ Z), 
   but still accept the older syntax ppm(X, ~Z). 
   To support both kinds of syntax, the functions 'ppm' and 'kppm'
   are now generic, with methods for the classes 'formula', 'ppp' and 'quad'. 
   The 'formula' method handles a syntax like ppm(X ~ Z) while the
   'ppp' method handles the old syntax ppm(X, ~Z).
   Similarly 'lppm' is generic with methods for 'formula' and 'lpp'.

   o ppm, kppm, lppm
   Covariates appearing in the model formula can be objects 
   which exist in the R session, instead of always having to be
   elements of the list `covariates'.
   
   o ppm.formula, kppm.formula, lppm.formula
   Formulae involving polynom() are now expanded, symbolically,
   so that polynom(x, 3) becomes x + I(x^2) + I(x^3) 
   and polynom(x,y,2) becomes x + y + I(x^2) + I(x*y) + I(y^2).
   This neatens the model output, and also makes it possible
   for anova() and step() to add or delete single terms in the polynomial.

   o predict.ppm
   New argument 'interval' allows confidence intervals or prediction intervals
   to be calculated.

   o predict.ppm
   New argument 'total' allows for prediction of the total number of points
   in a specified region.
   
   o plot.ppp, plot.lpp
   For marked point patterns, a legend is automatically added
   to the plot, by default. Arguments have changed: new arguments
   include parameters of the legend, and an optional symbol map.
   Result has changed: it is now an object of class 'symbolmap'.

   o plot.ppp, plot.lpp
   Interpretation of the parameters 'markscale' and 'maxsize' 
   has changed. The size of a circle in the plot is now defined 
   as the circle's diameter instead of its radius. (Size of
   a square is measured, as before, by its side length). 

   o parres
   Now handles the case where the fitted model is not separable
   but its restriction to the given 'subregion' is separable.

   o envelope
   Now issues a warning if the usage of envelope() appears to be `invalid' 
   in the sense that the simulated patterns and the data pattern
   have not been treated equally.

   o Kinhom, Finhom, Ginhom, Jinhom
   New argument 'update'.
   If 'lambda' is a fitted model (class ppm or kppm) and update=TRUE,
   the model is re-fitted to the data pattern, before the intensities
   are computed.

   o rDiggleGratton, rDGS, rHardcore, rStrauss, rStraussHard
   By default the point pattern is now generated on
   a larger window, and trimmed to the original window.
   New argument expand=TRUE.

   o MultiStrauss, MultiHard, MultiStraussHard
   The syntax of these functions has changed.
   The new code should still accept the old syntax.

   o rhohat
   rhohat.ppp and rhohat.quad have new argument 'baseline'

   o ippm
   Algorithm improved. Argument syntax changed.

   o default.dummy, quadscheme
   Dummy points can now be generated by a quasirandom sequence.

   o plot.owin
   The window can now be filled with one of 8 different textures.
   Arguments changed. 

   o ppm, kppm
   Covariates in the model can now be tessellations.

   o [.im
   New argument 'tight' allows the resulting image to be trimmed 
   to the smallest possible rectangle.

   o [.psp, rlinegrid, rpoisline
   These functions now handle binary mask windows.

   o rotate
   The user can specify the centre of rotation.

   o rescale
   rescale() and all its methods now have argument 'unitname'
   which can be used to change the name of the unit of length.

   o anova.ppm
   Output format has been improved. 
   Number of columns of result has changed.

   o print.ppp, print.summary.ppp, print.owin, print.summary.owin,
   print.im, print.summary.im, print.fv, print.msr, print.profilepl
   These functions now avoid over-running the text margin
   (i.e. they respect options('width') where possible).

   o layerplotargs<-
   Now handles any spatial object, converting it to a 'layered' object.

   o effectfun
   Improved display in case se.fit=TRUE.

   o scaletointerval
   New argument 'xrange'

   o contour.im
   New argument 'show.all'.
   Default value of 'axes' changed to FALSE.

   o identify.ppp
   Now handles multivariate marks. 

   o plot.listof
   Improved layout.
   New arguments 'hsep', 'vsep'.
   Argument 'mar.panel' may have length 1, 2 or 4.

   o plot.splitppp
   This function is no longer identical to plot.listof.
   Instead it is a much simpler function which just
   calls plot.listof with equal.scales=TRUE.

   o anova.ppm
   Output is neater.

   o plot.layered
   New argument 'do.plot'

   o plot.psp
   New argument 'do.plot'
   
   o as.psp.owin
   New argument 'window'

   o plot.im, contour.im, textureplot
   New argument 'clipwin'

   o plot.ppp
   New argument 'clipwin'

   o plot.msr
   New argument 'how' allows density to be plotted as image and/or contour

   o diagnose.ppm, plot.diagppm
   More options for 'plot.neg'

   o plot.leverage.ppm, plot.influence.ppm, plot.msr
   Argument 'clipwin' can now be used to restrict the display
   to a subset of the full data.

   o [.hyperframe, [<-.hyperframe, $.hyperframe, $<-.hyperframe
   These functions are now documented.

   o leverage.ppm, influence.ppm, dfbetas.ppm
   Resulting objects are now smaller (in memory size).

   o print.ppm
   Now indicates whether the irregular parameters 'covfunargs'
   were optimised (by profilepl or ippm) or whether they were simply
   provided by the user.

   o plot.ppp
   A point pattern with numerical marks can now be plotted as
   filled dots with colours determined by the marks, 
   by setting pch=21 and bg=<colourmap>

   o colourmap
   Now handles dates and date-time values (of class 'Date' or 'POSIXt').

   o plot.ppp, print.ppp, summary.ppp
   Improved handling of dates and date-time values 
   (of class 'Date' or 'POSIXt') in the marks of a point pattern.

   o cut.im
   Now refuses to handle images whose pixel values are
   factor, logical or character.

   o centroid.owin
   New argument 'as.ppp'

   o superimpose
   Improved default names for columns of marks.

   o Softcore()
   Improved printout.

   o kppm, lgcp.estpcf, lgcp.estK
   Adjusted to new structure of RandomFields package.
   No change in syntax.

   o data(murchison)
   This dataset now belongs to class 'listof' so that it can be
   plotted directly.

   o data(clmfires)
   The format of the covariate data has changed.
   The objects 'clmcov100' and 'clmcov200' are now 
   elements of a list 'clmfires.extra'.

   o bounding.box
   This function is now Deprecated; it has been replaced 
   by the generic boundingbox().

   o as.psp.owin 
   This function is now Deprecated; it has been replaced 
   and extended by the function edges().

   o plot.kstest
   Changed defaults so that the two curves are distinguishable.

   o with.fv
   Improved mathematical labels.

BUG FIXES

   o intensity.quadratcount
   Values were incorrect for a rectangular tessellation
   (the matrix of intensities was transposed).
   Fixed.

   o rmh, simulate.ppm
   Simulation of the Strauss-hard core model (StraussHard) was incorrect
   (intensity of the simulated process was about 15% too low).
   Bug introduced in spatstat 1.31-0 (January 2013).

   o intensity.quadratcount
   Crashed for a rectangular tessellation with only a single row or column.
   Fixed.
   
   o model.images.ppm
   Crashed sometimes if the argument W was given.
   Fixed.

   o eval.im
   Crashed when applied to images with only a single row or column.
   Fixed.

   o ppp, marks<-.ppp
   If the marks were a vector of dates, they were erroneously 
   converted to numbers.
   Fixed.

   o ippm
   Crashed if the model formula included an offset term
   that was not a function.
   Fixed.

   o leverage.ppm
   Crashed sometimes when the model had irregular parameters ('covfunargs').
   Fixed.

   o residuals.ppm
   Crashed sometimes when type='score'.
   Fixed.

   o scaletointerval
   Did not handle dates and date-time values correctly.
   Fixed.

   o rbind.hyperframe, as.list.hyperframe
   Gave incorrect results for hyperframes with 1 row.
   Fixed.

   o Kinhom
   Did not renormalise the result (even when renormalise=TRUE), in some cases.
   Spotted by Peter Forbes.
   Fixed.

   o disc
   If mask=TRUE the disc was erroneously clipped to the square [-1,1] x [-1,1].
   Fixed.

   o plot.fv
   Sometimes shaded the wrong half of the graph 
   when the 'shade' coordinates were infinite.
   Fixed.

   o print.ppm
   Gave an error message if the coefficient vector had length zero.
   Fixed.

   o vcov.ppm
   Gave an error message if the coefficient vector had length zero.
   Fixed.

   o plot.distfun, as.im.distfun
   These functions effectively ignored the argument 'invert' 
   in the original call to distfun.
   Fixed.

   o plot.msr
   Ignored certain additional arguments such as 'pch'.
   Fixed.

   o cut.im
   Crashed if the image had 1 row or 1 column of pixels.
   Fixed.

   o iplot.ppp
   Crashed with message about missing object 'vals'.
   Fixed.

   o effectfun
   Demanded a value for every covariate supplied in the original call to ppm, 
   even for covariates which were not used in the model.
   Fixed.

   o plot.listof, plot.hyperframe
   When plotting 3D point patterns (class pp3), these functions
   issued warnings about 'add' being an unrecognised graphics argument.
   Fixed.

	CHANGES IN spatstat VERSION 1.36-0

OVERVIEW

   o We thank Sebastian Meyer, Kevin Ummer, Jean-Francois Coeurjolly,
   Ege Rubak, Rasmus Waagepetersen, Oscar Garcia and Sourav Das
   for contributions.

   o Important change to package dependencies.

   o Geometrical inconsistencies in polygons are now repaired automatically.

   o Improved quadrature schemes and reduced bias in ppm.

   o New vignette 'Summary of Recent Changes to Spatstat'.

   o Approximation to K function and pcf for Gibbs models.

   o Counterpart of 'apply' for lists of images.

   o Hexagonal grids and tessellations.

   o Extensions to scan test and Allard-Fraley cluster set estimator.

   o Change the parameters of a fitted model before simulating it.

   o Accelerated Kest, Kinhom for rectangular windows.

   o Extensions and improvements to plotting functions.

   o Improvements to labelling of 'fv' objects.

   o New demo of summary functions.

   o More methods for 'intensity'.

   o Version nickname: 'Intense Scrutiny'

NEW FUNCTIONS

   o Kmodel.ppm, pcfmodel.ppm
   Compute approximation to K-function or pair correlation function
   of a Gibbs point process model.

   o im.apply
   Apply a function to corresponding pixel values in several images.

   o hexgrid, hextess
   Create a hexagonal grid of points, or a tessellation of hexagonal tiles

   o shift.tess, rotate.tess, reflect.tess, scalardilate.tess, affine.tess
   Apply a geometrical transformation to a tessellation.

   o quantile.ewcdf
   Extract quantiles from a weighted cumulative distribution function.

   o scanLRTS
   Evaluate the spatially-varying test statistic for the scan test.

   o pcfmulti
   General multitype pair correlation function

   o intensity.splitppp
   Estimate intensity in each component of a split point pattern.

   o intensity.quadratcount
   Use quadrat counts to estimate intensity in each quadrat.

   o as.owin.quadratcount, as.owin.quadrattest
   Extract the spatial window in which quadrat counts were performed.

   o reload.or.compute
   Utility function for R scripts: 
   either reload results from file, or compute them.

   o to.grey
   Convert colour to greyscale.

   o Smooth.im
   Method for Smooth() for pixel images. Currently identical to blur().

   o demo(sumfun)
   Demonstration of nonparametric summary functions in spatstat.

SIGNIFICANT USER-VISIBLE CHANGES

   o Package Dependencies
   spatstat now "Imports" (rather than "Depends" on) 
   the libraries mgcv, deldir, abind, tensor, polyclip.
   This means that these libraries are not accessible to the user
   unless the user explicitly loads them by typing 'library(mgcv)' and so on.

   o owin, as.owin
   Polygon data are no longer subjected to strict checks on 
   geometrical validity (self-crossing points, overlaps etc.)
   Instead, polygon geometry is automatically repaired.
   
   o ppm
   The default quadrature scheme for a point pattern
   has been improved (in the case of a non-rectangular window)
   to remove a possible source of bias.

   o Performance 
   various parts of spatstat now run slightly faster.

   o scan.test 
   Now handles multiple values of circle radius 'r'.

   o plot.scan.test, as.im.scan.test
   These functions can now give the optimal value of circle radius 'r'.

   o pcfcross, pcfdot
   Algorithms have been reimplemented using a single-pass kernel smoother
   and now run much faster. Bandwidth selection rule improved.

   o plot.listof, plot.splitppp
   Default behaviour has changed: panels are now plotted on different scales. 

   o plot.listof, plot.splitppp
   When 'equal.scales=TRUE' the panels are plotted on exactly equal scales
   and are exactly aligned (under certain conditions).

   o ppp, marks.ppp, marks<-.ppp
   New argument 'drop' determines whether a data frame with a single column
   will be converted to a vector.

   o simulate.ppm, rmh.ppm, rmhmodel.ppm
   New argument 'new.coef' allows the user to change the parameters
   of a fitted model, before it is simulated.

   o logLik.ppm
   New argument 'new.coef' allows the user to evaluate the 
   loglikelihood for a different value of the parameter.

   o clusterset
   The argument 'result' has been renamed 'what'.
   It is now possible to give multiple values to 'what'
   so that both types of result can be computed together.

   o residuals.ppm
   Argument 'coefs' has been renamed 'new.coef' for consistency
   with fitted.ppm etc. 

   o residuals.ppm
   If drop=TRUE the window associated with the residuals
   is now taken to be the domain of integration of the composite likelihood.
   
   o intensity.ppp
   Now has argument 'weights'

   o density.ppp, Smooth.ppp, markmean, markvar, intensity.ppp
   Argument 'weights' can now be an 'expression'.

   o pcf
   New argument 'domain' causes the computation to be restricted to 
   a subset of the window.

   o nnclean
   The result now has attributes which give the fitted parameter values,
   information about the fitting procedure, and the histogram bar heights.

   o nnclean
   Extra arguments are now passed to hist.default.

   o plot.tess
   For a tessellation represented by a pixel image, 
   plot.tess no longer treats the pixel labels as palette colours.

   o relrisk
   New argument 'case' allows the user to specify which mark value
   corresponds to the cases in a case-control dataset.

   o Kinhom
   Now accepts correction="good" 

   o spatstat.options
   New option ('monochrome') controls whether plots generated by spatstat
   will be displayed in colour or in greyscale. This will eventually be
   applied to all plot commands in spatstat. 

   o plot.im, persp.im, contour.im, plot.owin, plot.psp, plot.fv, plot.fasp
   These functions now obey spatstat.options('monochrome')

   o plot.ppp, plot.owin, plot.im, plot.psp, plot.tess, plot.layered
   New universal argument 'show.all' determines what happens
   when a plot is added to an existing plot. If show.all = TRUE
   then everything is plotted, including the main title and colour ribbon.

   o plot.ppp
   New argument 'show.window' 

   o plot.im 
   New arguments 'add' and 'do.plot'.
   More arguments recognised by 'ribargs'

   o plot.layered
   New arguments 'add', 'main' 
   Better argument handling.

   o plot.fv
   Improved handling of argument 'shade'

   o layered, layerplotargs, plot.layered
   The plotting argument can now be a list of length 1,
   which will be replicated to the correct length.

   o varblock
   Ugly legends have been repaired.

   o quad.ppm
   New argument 'clip'

   o edge.Trans
   New arguments 'dx', 'dy'

   o disc
   Argument 'centre' can be in various formats.

   o affine, shift
   Argument 'vec' can be in various formats.

   o Geyer, BadGey
   A warning is no longer issued when the parameter 'sat' is fractional.

   o adaptive.density
   Now has argument 'verbose'

   o Smooth.ppp
   'sigma' is now a formal argument of Smooth.ppp

   o plot.quadratcount, plot.quadrattest
   These functions have now been documented.

   o Summary functions and envelopes
   Improved mathematical labels in plots.

   o Kest
   Accelerated, in the case of a rectangular window.

   o Kscaled
   Argument 'lambda' can now be a fitted model (class ppm)

   o print.fv
   Improved layout.

   o plot.bermantest
   Improved graphics.

   o which.max.im
   This function is now deprecated.
   which.max.im(x) is superseded by im.apply(x, which.max)

   o smooth.ppp, smooth.fv, smooth.msr
   These functions are now deprecated, in favour of 'Smooth' with a capital 'S'

BUG FIXES

   o bw.ppl
   Crashed if the point pattern had multiple points at the same location.
   Fixed.

   o quantile
   Crashed when applied to the result of 'ewcdf'.
   Fixed.

   o marks<-.ppp
   Crashed with a message about 'unrecognised format'
   if the current or replacement values of marks
   were date/time values (belonging to class 'Date' or 'POSIXt').
   Fixed.

   o plot.im
   Crashed in case log=TRUE if the window was not a rectangle.
   Fixed.

   o vcov.ppm
   Crashed sometimes for models with a hard core term
   (Hardcore, StraussHard, MultiHard or MultiStrauss interactions).
   Spotted by Rasmus Waagepetersen.
   Fixed.

   o multiplicity.data.frame
   Results were incorrect and included NA's (spotted by Sebastian Meyer).
   Fixed.

   o markvar
   Values were incorrect.
   Fixed.

   o Smooth.ppp
   Ignored argument 'diggle'.
   Fixed.

   o rotate.im, affine.im
   Factor-valued images were not handled correctly.
   Fixed.

   o shift.layered
   If argument 'origin' was used, different layers were shifted by 
   different amounts.
   Fixed.

   o tile.areas
   Sometimes returned a list instead of a numeric vector.
   Fixed.

   o print.ppp
   If the marks were date/time values (belonging to class 'Date' or 'POSIXt'),
   print.ppp reported that they were double precision numbers.
   Fixed.

   o plot.layered
   Graphics were mangled if the argument 'add=FALSE' was given explicitly.
   Fixed.

   o Smooth.ppp
   The argument 'sigma' was only recognised if it was explicitly named.
   For example in 'Smooth(X, 5)' the '5' was ignored.
   Fixed.

   o clusterset
   The bounding frame of the result was smaller than the
   original bounding frame of the point pattern dataset,
   when result="domain" and exact=TRUE.
   Fixed.

   o plot.im
   Ignored argument 'col' if it was a 'function(n)'.
   Fixed.

   o Kinhom
   Ignored argument 'correction' if there were more than 1000 points.
   Fixed.

   o [.fv
   Mangled the plot label for the y axis.
   Fixed.

   o cbind.fv
   Mangled the plot label for the y axis.
   Fixed.

   o plot.envelope
   Main title was always 'x'.
   Fixed.

   o print.ppp
   Ran over the right margin.
   Fixed.

   o union.owin, intersect.owin, setminus.owin
   Sometimes deleted the name of the unit of length.
   Fixed.

	CHANGES IN spatstat VERSION 1.35-0

OVERVIEW

   o We thank Melanie Bell, Leanne Bischof, Ida-Maria Sintorn,
     Ege Rubak, Martin Hazelton, Oscar Garcia, 
     Rasmus Waagepetersen, Abdollah Jalilian
     and Jens Oehlschlaegel for contributions.

   o Support for analysing replicated spatial point patterns.

   o New vignette on analysing replicated spatial point patterns.

   o Objective function surface plots.

   o Estimator of point process intensity using nearest neighbour distances.

   o Improved estimator of pair correlation function.

   o Four new datasets. 

   o Simple point-and-click interface functions for general use.

   o More support for fv objects.

   o More support for ppx objects.

   o Extensions to nearest neighbour functions.

   o Morphological operations accelerated.

   o Bug fix to pair correlation functions.

   o Bug fix to k-th nearest neighbour distances

   o Version nickname: 'Multiple Personality'

NEW CLASSES

  o mppm
  An object of class 'mppm' represents a Gibbs point process model
  fitted to several point pattern datasets. The point patterns may
  be treated as independent replicates of the same point process,
  or as the responses in an experimental design, so that the 
  model may depend on covariates associated with the design.
  Methods for this class include print, plot, predict, anova and so on.

  o objsurf
  An object of class 'objsurf' contains values of the likelihood 
  or objective function in a neighbourhood of the maximum.

  o simplepanel
  An object of class 'simplepanel' represents a spatial arrangement of buttons
  that respond to mouse clicks, supporting a simple, robust graphical interface.
  
NEW FUNCTIONS

  o mppm
  Fit a Gibbs model to several point patterns.
  The point pattern data may be organised as a designed experiment
  and the model may depend on covariates associated with the design.

  o anova.mppm
  Analysis of Deviance for models of class mppm

  o coef.mppm
  Extract fitted coefficients from a model of class mppm

  o fitted.mppm
  Fitted intensity or conditional intensity for a model of class mppm

  o kstest.mppm
  Kolmogorov-Smirnov test of goodness-of-fit for a model of class mppm

  o logLik.mppm
  log likelihood or log pseudolikelihood for a model of class mppm

  o plot.mppm
  Plot the fitted  intensity or conditional intensity of a model of class mppm

  o predict.mppm
  Compute the fitted  intensity or conditional intensity 
  of a model of class mppm

  o quadrat.test
  Quadrat counting test of goodness-of-fit for a model of class mppm

  o residuals.mppm
  Point process residuals for a model of class mppm

  o subfits
  Extract point process models for each individual point pattern dataset,
  from a model of class mppm

  o vcov.mppm
  Variance-covariance matrix for a model of class mppm

  o integral.msr
  Integral of a measure.

  o objsurf
  For a model fitted by optimising an objective function, this command
  computes the objective function in a neighbourhood of the optimal value.

  o contour.objsurf, image.objsurf, persp.objsurf, plot.objsurf
  Plot an 'objsurf' object.

  o fvnames
  Define groups of columns in a function value table, for use in plot.fv, etc

  o multiplicity
  New generic function for which multiplicity.ppp is a method.

  o unique.ppx, duplicated.ppx, multiplicity.ppx
  Methods for unique(), duplicated() and multiplicity() for 'ppx' objects.
  These also work for 'pp3' and 'lpp' objects.

  o closepairs, crosspairs, closepaircounts, crosspaircounts
  Low-level functions for finding all close pairs of points 

  o nndensity 
  Estimate point process intensity using k-th nearest neighbour distances

  o simplepanel, run.simplepanel
  Support for a simple point-and-click interface for general use.

NEW DATASETS

   o pyramidal
   Diggle-Lange-Benes data on pyramidal neurons in cingulate cortex.
   31 point patterns divided into 3 groups.
   
   o waterstriders
   Nummelin-Penttinen waterstriders data.
   Three independent replicates of a point pattern formed by insects.

   o simba
   Simulated data example for mppm.
   Two groups of point patterns with different interpoint interactions.

   o demohyper
   Simulated data example for mppm.
   Point patterns and pixel image covariates, in two groups
   with different regression coefficients.

SIGNIFICANT USER-VISIBLE CHANGES

   o plot.hyperframe
   The argument 'e' now has a different format.
   Instead of plot(h, plot(XYZ)) one must now type plot(h, quote(plot(XYZ)))
   This is necessary in order to avoid problems with 'S4 method dispatch'.
   
   o pcf.ppp, pcfinhom
   New argument 'divisor' enables better performance of the estimator
   of pair correlation function for distances close to zero.
   
   o applynbd
   The arguments N, R and criterion may now be specified together.

   o markstat
   The arguments N and R may now be specified together.

   o ppx
   New argument 'simplify' allows the result to be converted to
   an object of class 'ppp' or 'pp3' if appropriate.

   o as.function.fv
   Now allows multiple columns to be interpolated

   o multiplicity.ppp
   This function is now a method for the generic 'multiplicity'.
   It has also been accelerated.

   o nnfun.ppp, distfun.ppp
   New argument 'k' allows these functions to compute k-th nearest neighbours.

   o rVarGamma, kppm, vargamma.estK, vargamma.estpcf
   New argument 'nu.pcf' provides an alternative way to specify
   the kernel shape in the VarGamma model, instead of the existing
   argument 'nu.ker'. Function calls that use the ambiguous argument
   name 'nu' will no longer be accepted.

   o nnmap
   Image is now clipped to the original window.

   o dilation, erosion, opening, closing
   Polygonal computations greatly accelerated.

   o plot.colourmap
   Improved appearance and increased options, for discrete colourmaps.

   o plot.msr
   Improved appearance

   o plot.ppp, plot.owin
   An `empty' plot can now be generated by setting type="n"

   o nndist.ppp, nnwhich.ppp, nncross.ppp
   Column names of the result are now more informative.

BUG FIXES

   o nncross.ppp
   Results were completely incorrect when k > 1.
   Spotted by Jens Oehschlaegel. 
   Bug was introduced in spatstat 1.34-1. 
   Fixed.

   o rVarGamma
   Simulations were incorrect; they were generated using the wrong value
   of the parameter 'nu.ker'. Spotted by Rasmus Waagepetersen and
   Abdollah Jalilian. Bug was always present.		    
   Fixed.
   
   o pair correlation functions (pcf.ppp, pcfdot, pcfcross, pcfinhom, ...)
   The result had a negative bias at the maximum 'r' value,
   because contributions to the pcf estimate from interpoint distances
   greater than max(r) were mistakenly omitted. 
   Spotted by Rasmus Waagepetersen and Abdollah Jalilian. 
   Bug was always present.
   Fixed.

   o demo(spatstat)
   This demonstration script had some unwanted side-effects, such as
   rescaling the coordinates of standard datasets 'bramblecanes', 
   'amacrine' and 'demopat', which caused the demonstration to crash 
   when it was repeated several times, and caused errors in demo(data).
   Fixed.

   o rmh
   Visual debugger crashed sometimes with message 'XI not found'.
   Fixed.

   o predict.ppm
   Crashed if the model was fitted using 'covfunargs'.
   Fixed.

   o bounding.box
   Crashed if one of the arguments was NULL.
   Fixed.

   o multiplicity.ppp
   Did not handle data frames of marks. 
   Fixed.

	CHANGES IN spatstat VERSION 1.34-1

OVERVIEW

   o We thank Kurt Hornik, Ted Rosenbaum, Ege Rubak and Achim Zeileis
    for contributions.

   o Important bug fix.

SIGNIFICANT USER-VISIBLE CHANGES

   o as.box3
   Now accepts objects of class 'ppx' or 'boxx'.

   o crossdist.ppp, crossdist.pp3, crossdist.default
   New argument 'squared' allows the squared distances to be computed
   (saving computation time in some applications)

BUG FIXES

   o union.owin, is.subset.owin, dilation.owin
   Results were sometimes completely wrong for polygons with holes.
   Spotted by Ted Rosenbaum.
   Fixed.

   o psstA, areaLoss
   Crashed in some cases, with error message
   'Number of items to replace is not a multiple of replacement length'. 
   Spotted by Achim Zeileis.
   Fixed.

	CHANGES IN spatstat VERSION 1.34-0

OVERVIEW

   o We thank Andrew Bevan, Ege Rubak, Aruna Jammalamadaka, 
   Greg McSwiggan, Jeff Marcus, Jose M Blanco Moreno,
   and Brian Ripley for contributions.

   o spatstat and all its dependencies are now Free Open Source.

   o spatstat does not require the package 'gpclib' any more.
   
   o spatstat now depends on the packages 'tensor', 'abind' and 'polyclip'

   o polygon clipping is now enabled always.

   o Substantially more support for point patterns on linear networks.

   o Faster computations for pairwise interaction models.

   o Bug fixes in nearest neighbour calculations.

   o Bug fix in leverage and influence diagnostics.

   o Version nickname: "Window Cleaner"

   o spatstat now requires R version 3.0.2 or later

NEW FUNCTIONS

   o as.lpp
   Convert data to a point pattern on a linear network.

   o distfun.lpp
   Distance function for point pattern on a linear network.

   o eval.linim
   Evaluate expression involving pixel images on a linear network.

   o linearKcross, linearKdot, linearKcross.inhom, linearKdot.inhom
   Multitype K functions for point patterns on a linear network

   o linearmarkconnect, linearmarkequal
   Mark connection function and mark equality function 
   for multitype point patterns on a linear network

   o linearpcfcross, linearpcfdot, linearpcfcross.inhom, linearpcfdot.inhom
   Multitype pair correlation functions for point patterns on a linear network

   o linfun
   New class of functions defined on a linear network

   o nndist.lpp, nnwhich.lpp, nncross.lpp
   Methods for nndist, nnwhich, nncross for point patterns on a linear network

   o nnfun.lpp
   Method for nnfun for point patterns on a linear network

   o vcov.lppm
   Variance-covariance matrix for parameter estimates of a fitted
   point process model on a linear network.

   o bilinearform
   Computes a bilinear form 

   o tilenames, tilenames<-
   Extract or change the names of tiles in a tessellation.

SIGNIFICANT USER-VISIBLE CHANGES

   o package dependencies 
   Previous versions of spatstat used the package 'gpclib' 
   to perform geometrical calculations on polygons.
   Spatstat now uses the package 'polyclip' for polygon calculations instead.

   o free open-source licence
   The restrictive licence conditions of 'gpclib' no longer apply 
   to users of spatstat. Spatstat and all its dependencies are now
   covered by a free open-source licence.

   o polygon clipping
   In previous versions of spatstat, geometrical calculations
   on polygons could be performed 'exactly' using gpclib
   or 'approximately' using pixel discretisation. 
   Polygon calculations are now always performed 'exactly'.
   
   o intersect.owin, union.owin, setminus.owin
   If A and B are polygons, the result is a polygon.

   o erosion, dilation, opening, closing
   If the original set is a polygon, the result is a polygon.

   o intersect.tess, dirichlet
   The tiles of the resulting tessellation are polygons 
   if the input was polygonal.

   o plot.owin
   Polygons with holes can now be plotted with filled colours
   on any device.

   o lppm
   New arguments 'eps' and 'nd' control the quadrature scheme.

   o pairwise interaction Gibbs models
   Many calculations for these models have been accelerated.

BUG FIXES

   o nncross.pp3
   Values were completely incorrect in some cases.
   Usually accompanied by a warning about NA values.
   (Spotted by Andrew Bevan.)
   Fixed.

   o nnmap, nnmark
   A small proportion of pixels had incorrect values.
   [These were the pixels lying on the boundary of a Dirichlet cell.]
   Fixed. 

   o leverage.ppm, influence.ppm, dfbetas.ppm
   Results were incorrect for non-Poisson processes.
   Fixed.

   o distcdf
   Results were incorrect in some cases
   when W was a window and V was a point pattern.
   Fixed.

   o Kcross, Kdot, pcfcross, pcfdot
   Results were incorrect in some rare cases.
   Fixed.

   o as.fv.kppm
   Erroneously returned a NULL value.
   Fixed.

   o vcov.ppm
   For point process models fitted with method = 'logi',
   sometimes crashed with error "object 'fit' not found".
   (Spotted by Ege Rubak).
   Fixed.

   o vcov.ppm
   For multitype point process models, sometimes crashed
   with error "argument 'par' is missing".
   Fixed.

   o plot.im
   Crashed if some of the pixel values were infinite.
   Fixed.

   o owin 
   owin(poly=..) crashed if there were NA's in the polygon coordinates.
   Spotted by Jeff Marcus.
   Fixed.

   o plot.fv
   Crashed, giving an incomprehensible error,
   if the plot formula contained a number with a decimal point.
   Fixed.

   o alltypes
   Crashed if envelopes=TRUE and global=TRUE, 
   with error message 'csr.theo not found'.
   Spotted by Jose M Blanco Moreno.
   Fixed.

   o chop.tess, rMosaicField
   Format of result was garbled in some cases.
   Fixed.

   o vcov.ppm
   Sometimes gave an irrelevant warning "parallel option not available".
   Fixed.

	CHANGES IN spatstat VERSION 1.33-0

OVERVIEW

   o We thank Kurt Hornik and Brian Ripley for advice.

   o The package namespace has been modified.

   o Numerous internal changes.

   o Likelihood cross-validation for smoothing bandwidth.

   o More flexible models of intensity in cluster/Cox processes.

   o New generic function for smoothing.

   o Version nickname: 'Titanic Deckchair'

NEW FUNCTIONS

    o bw.ppl
    Likelihood cross-validation technique 
    for bandwidth selection in kernel smoothing.

    o is.lppm, is.kppm, is.slrm
    Tests whether an object is of class 'lppm', 'kppm' or 'slrm'

    o Smooth
    New generic function for spatial smoothing.

    o Smooth.ppp, Smooth.fv, Smooth.msr
    Methods for Smooth
    (identical to smooth.ppp, smooth.fv, smooth.msr respectively)

    o fitted.kppm
    Method for 'fitted' for cluster/Cox models

SIGNIFICANT USER-VISIBLE CHANGES

    o namespace
    The namespace of the spatstat package has been changed.

    o internal functions
    Some undocumented internal functions are no longer visible,
    as they are no longer exported in the namespace. These functions
    can still be accessed using the form spatstat:::functionname.
    Functions that are not visible are not guaranteed to exist 
    or to remain the same in future. 

    o methods
    For some generic functions defined in the spatstat package,
    it is possible that R may fail to find one of the methods
    for the generic. This is a temporary problem due to a restriction
    on the size of the namespace in R 3.0.1. It will be fixed in 
    future versions of R and spatstat. It only applies to methods
    for a generic which is a spatstat function (such as nndist)
    and does not apply to methods for generics defined elsewhere
    (such as density). In the meantime, if this problem should occur, 
    it can be avoided by calling the method explicitly, in the form
    spatstat:::genericname.classname.

    o speed
    The package should run slightly faster overall, due to the
    improvement of the namespace, and changes to internal code.

    o envelope
    New argument 'envir.simul' determines the environment
    in which to evaluate the expression 'simulate'.

    o kppm
    More flexible models of the intensity, and greater control over the
    intensity fitting procedure, are now possible using the arguments
    'covfunargs', 'use.gam', 'nd', 'eps' passed to ppm.
    Also the argument 'X' may now be a quadrature scheme.

    o distcdf
    Arguments W and V can now be point patterns.

    o Kest
    New option: correction = "good" 
    selects the best edge correction that can be computed in reasonable time.

    o bw.diggle
    Accelerated.

    o predict.ppm
    Calculation of standard error has been accelerated.

    o smooth.ppp, smooth.fv, smooth.msr
    These functions will soon be 'Deprecated' in favour of
    the methods Smooth.ppp, Smooth.fv, Smooth.msr respectively.

    o stratrand, overlap.owin, update.slrm, edge.Trans, edge.Ripley
    These already-existing functions are now documented.

BUG FIXES

    o kppm, matclust.estpcf, pcfmodel
    The pair correlation function of the Matern Cluster Process
    was evaluated incorrectly at distances close to 0.
    This could have affected the fitted parameters 
    in matclust.estpcf() or kppm(clusters="MatClust").
    Fixed.

    o anova.ppm
    Would cause an error in future versions of R
    when 'anova.glm' is removed from the namespace.
    Fixed.

	CHANGES IN spatstat VERSION 1.32-0

OVERVIEW

   o We thank Ege Rubak for major contributions.

   o Thanks also to Patrick Donnelly, Andrew Hardegen,
     Tom Lawrence, Robin Milne, Gopalan Nair and Sean O'Riordan.

   o New 'logistic likelihood' method for fitting Gibbs models.

   o Substantial acceleration of several functions
     including profile maximum pseudolikelihood
     and variance calculations for Gibbs models.

   o Nearest neighbours for point patterns in 3D

   o Nearest-neighbour interpolation in 2D

   o New 'progress plots' 

   o Hard core thresholds can be estimated automatically.

   o More support for colour maps

   o More support for 'fv' objects

   o Spatstat now has version nicknames.
   The current version is "Logistical Nightmare".
 
   o Minor improvements and bug fixes.

NEW FUNCTIONS

   o nncross.pp3
   Method for 'nncross' for point patterns in 3D

   o nnmark
   Mark of nearest neighbour - can be used for interpolation

   o dclf.progress, mad.progress
   Progress plots (envelope representations) for the DCLF and MAD tests.

   o deriv.fv
   Numerical differentiation for 'fv' objects.

   o interp.colourmap
   Smooth interpolation of colour map objects - makes it easy to build
   colour maps with gradual changes in colour

   o tweak.colourmap
   Change individual colour values in a colour map object

   o beachcolourmap
   Colour scheme appropriate for `altitudes' (signed numerical values)

   o as.fv
   Convert various kinds of data to an 'fv' object

   o quadscheme.logi
   Generates quadrature schemes for the logistic method of ppm.

   o beginner
   Introduction for beginners.

SIGNIFICANT USER-VISIBLE CHANGES

   o ppm
   New option: method = "logi" 
   Fits a Gibbs model by the newly developed 'logistic likelihood' method
   which is often faster and more accurate than maximum pseudolikelihood.
   Code contributed by Ege Rubak.
   
   o profilepl
   Greatly accelerated, especially for area-interaction models.

   o vcov.ppm
   Greatly accelerated for higher-order interaction models.

   o smooth.ppp
   Now handles bandwidths equal to zero (by invoking 'nnmark')

   o Hardcore, StraussHard
   The hard core distance 'hc' can now be omitted; 
   it will be estimated from data.

   o plot.ppp
   Now behaves differently if there are multiple columns of marks.
   Each column of marks is plotted, in a series of separate plots
   arranged side-by-side.

   o plot.im
   Argument 'col' can now be a function

   o lohboot
   Now computes confidence intervals for L-functions as well
   (fun="Lest" or fun="Linhom")

   o dclf.test, mad.test
   The argument X can now be an object produced by a previous call
   to dclf.test or mad.

   o plot.fv
   Labelling of plots has been improved in some cases.

   o smooth.fv
   Further options added.

   o density.ppp
   The argument 'weights' can now be a matrix.

   o smooth.ppp
   Accelerated, when there are several columns of marks.

   o density.ppp
   Accelerated slightly.

   o simulate.ppm, simulate.kppm
   The total computation time is also returned.

   o simulate.kppm
   Now catches errors (such as 'insufficient memory').
   
   o latest.news, licence.polygons
   Can now be executed by typing the name of the function without parentheses.

   o latest.news
   The text is now displayed one page at a time.

BUG FIXES

   o Hest, Gfox, Jfox
   The 'raw' estimate was not computed correctly (or at least 
   it was not the raw estimate described in the help files).
   Spotted by Tom Lawrence.
   Fixed.

   o edges2vees
   Format of result was incorrect if there were fewer than 3 edges.
   Fixed.

   o Jfox
   The theoretical value (corresponding to independence between X and Y)
   was erroneously given as 0 instead of 1.
   Spotted by Patrick Donnelly.
   Fixed.

   o ppm, quadscheme, default.dummy 
   If the grid spacing parameter 'eps' was specified,
   the quadrature scheme was sometimes slightly incorrect
   (missing a few dummy points near the window boundary).
   Fixed.

   o print.timed
   Matrices were printed incorrectly.
   Fixed.

	CHANGES IN spatstat VERSION 1.31-3

OVERVIEW

   o spatstat now 'Suggests' the package 'tensor'

   o Code slightly accelerated.

   o More support for pooling of envelopes.

   o Bug fixes.

NEW FUNCTIONS

   o nnmap
   Given a point pattern, finds the k-th nearest point in the pattern
   from each pixel in a raster.

   o coef.fii, coef.summary.fii
   Extract the interaction coefficients of a fitted interpoint interaction

   o edges2vees
   Low-level function for finding triples in a graph.


SIGNIFICANT USER-VISIBLE CHANGES

   o predict.ppm
   New argument 'correction' allows choice of edge correction
   when calculating the conditional intensity.

   o pool.envelope
   New arguments 'savefuns' and 'savepatterns'.

   o pool.envelope
   Envelopes generated with VARIANCE=TRUE can now be pooled.

   o pool.envelope
   The plot settings of the input data are now respected.

   o Numerous functions have been slightly accelerated.

BUG FIXES

   o predict.ppm
   Calculation of the conditional intensity omitted the edge correction
   if correction='translate' or correction='periodic'.
   Fixed.

   o shift.lpp, rotate.lpp, scalardilate.lpp, affine.lpp,
    shift.linnet, rotate.linnet, scalardilate.linnet, affine.linnet
   The enclosing window was not correctly transformed. 
   Fixed.

   o rHardcore, rStraussHard, rDiggleGratton, rDGS
   The return value was invisible.
   Fixed.

   o ppm
   In rare cases the results obtained with forcefit=FALSE and forcefit=TRUE
   were different, due to numerical rounding effects.
   Fixed.

	CHANGES IN spatstat VERSION 1.31-2

OVERVIEW

   o We thank Robin Corria Anslie, Julian Gilbey, Kiran Marchikanti,
   Ege Rubak and Thordis Linda Thorarinsdottir for contributions.

   o spatstat now depends on R 3.0.0

   o More support for linear networks

   o More functionality for nearest neighbours

   o Bug fix in fitting Geyer model

   o Performance improvements and bug fixes

NEW FUNCTIONS

   o affine.lpp, shift.lpp, rotate.lpp, rescale.lpp, scalardilate.lpp
   Geometrical transformations for point patterns on a linear network

   o affine.linnet, shift.linnet, rotate.linnet, 
   rescale.linnet, scalardilate.linnet
   Geometrical transformations for linear networks

   o [.linnet
   Subset operator for linear networks

   o timed
   Records the computation time taken
   
SIGNIFICANT USER-VISIBLE CHANGES

   o nncross
   nncross.ppp can now find the k-th nearest neighbours, for any k.

   o nndist, nnwhich
   New argument 'by' makes it possible to find nearest neighbours
   belonging to specified subsets in a point pattern, for example,
   the nearest neighbour of each type in a multitype point pattern.

   o [.fv
   Now handles the argument 'drop'.

   o with.fv
   Argument 'drop' replaced by new argument 'fun'
   (with different interpretation).

   o [.lpp
   Subset index may now be a window (class 'owin')

   o Kest
   Options correction='border' and correction='none'
   now run about 4 times faster, thanks to Julian Gilbey.

   o density.ppp
   Numerical underflow no longer occurs when sigma is very small
   and 'at="points"'. A warning is no longer issued.
   Thanks to Robin Corria Anslie.

   o crossing.psp
   New argument 'fatal' allows the user to handle empty intersections

   o union.owin
   It is now guaranteed that if A is a subset of B, then union.owin(A,B)=B.

   o plot.colourmap
   Now passes arguments to axis() to control the plot.
   Appearance of plot improved.

   o image.listof
   Now passes arguments to plot.colourmap() if equal.ribbon=TRUE.

   o kppm
   Accelerated (especially for large datasets).

   o plot.envelope
   plot.envelope is now equivalent to plot.fv and is essentially redundant.

   o rThomas, rMatClust, rNeymanScott
   Improved explanations in help files.

   o All functions
   Many functions have been slightly accelerated.

BUG FIXES

   o ppm
   Results were incorrect for the Geyer saturation model
   with a non-integer value of the saturation parameter 'sat'.
   Spotted by Thordis Linda Thorarinsdottir.
   Bug introduced in spatstat 1.20-0, July 2010.
   Fixed.

   o ppm
   Fitting a stationary Poisson process using a nonzero value of 'rbord',
   as in "ppm(X, rbord=R)" with R > 0, gave incorrect results.
   Fixed.

   o predict.slrm
   Crashed with message 
   'longer object length is not a multiple of shorter object length' 
   if the original data window was not a rectangle.
   Fixed.

   o iplot
   Main title was sometimes incorrect.
   Fixed.

   o plot.layered
   Ignored argument 'main' in some cases.
   Fixed.

   o plot.listof, image.listof
   Crashed sometimes with a message 'figure margins too large'
   when equal.ribbon=TRUE.
   Fixed.

   o print.ppx
   Crashed if the object contained local coordinates.
   Fixed.

   o transect.im
   Crashed if the transect lay partially outside the image domain.
   Fixed.

   o rthin
   Crashed if X was empty.
   Fixed.

   o max.im, min.im, range.im
   Ignored additional arguments after the first argument.
   Fixed.

   o update.lppm
   Updated object did not remember the name of the original dataset.
   Fixed.

   o envelope
   Grey shading disappeared from plots of envelope objects 
   when the envelopes were transformed using eval.fv or eval.fasp.
   Fixed.

   
	CHANGES IN spatstat VERSION 1.31-1

OVERVIEW

   o We thank Marcelino de la Cruz, Daniel Esser, Jason Goldstick,
     Abdollah Jalilian, Ege Rubak and Fabrice Vinatier for contributions.

   o Nonparametric estimation and tests for 
     point patterns in a linear network.

   o More support for 'layered' objects.

   o Find clumps in a point pattern.

   o Connected component interaction model.

   o Improvements to interactive plots.

   o Visual debugger for Metropolis-Hastings algorithm.

   o Bug fix in Metropolis-Hastings simulation of Geyer process.

   o Faster Metropolis-Hastings simulation.

   o Faster computation of 'envelope', 'fv' and 'fasp' objects.

   o Improvements and bug fixes.

NEW FUNCTIONS

   o connected.ppp
   Find clumps in a point pattern.

   o kstest.lpp, kstest.lppm
   The spatial Kolmogorov-Smirnov test can now be applied 
   to point patterns on a linear network (class 'lpp') and 
   point processes on a linear network (class 'lppm').

   o bermantest.lpp, bermantest.lppm
   Berman's Z1 and Z2 tests can now be applied to point patterns
   on a linear network (class 'lpp') and point processes on a linear
   network (class 'lppm').

   o rhohat.lpp, rhohat.lppm
   Nonparametric estimation of the dependence of a point pattern
   on a spatial covariate: 'rhohat' now applies to 
   objects of class 'lpp' and 'lppm'.

   o intensity.lpp
   Empirical intensity of a point pattern on a linear network.

   o as.function.rhohat
   Converts a 'rhohat' object to a function,
   with extrapolation beyond the endpoints.

   o [.layered
   Subset operator for layered objects.

   o shift, rotate, affine, rescale, reflect, flipxy, scalardilate
   These geometrical transformations now work for 'layered' objects.

   o iplot.layered
   Interactive plotting for 'layered' objects.

   o as.owin.layered
   Method for as.owin for layered objects.

   o [.owin
   Subset operator for windows, equivalent to intersect.owin.

   o rcellnumber
   Generates random integers for the Baddeley-Silverman counterexample.

   o is.lpp
   Tests whether an object is a point pattern on a linear network.

   o is.stationary.lppm, is.poisson.lppm
   New methods for is.stationary and is.poisson for class 'lppm'

   o sessionLibs
   Print library names and version numbers (for use in Sweave scripts)

SIGNIFICANT USER-VISIBLE CHANGES

   o iplot
   iplot is now generic, with methods for 'ppp', 'layered' and 'default'.
   iplot methods now support zoom and pan navigation.

   o rmh.default
   New argument 'snoop' allows the user to activate a visual debugger
   for the Metropolis-Hastings algorithm.

   o connected
   connected() is now generic, with methods for 'im', 'owin' and 'ppp'.

   o alltypes
   Now works for lpp objects 

   o rlabel
   Now works for lpp, pp3, ppx objects

   o plot.kstest
   Can now perform P-P and Q-Q plots as well.

   o plot.fasp
   New argument 'samey' controls whether all panels 
   have the same y limits.

   o plot.fasp
   Changed default value of 'samex'.

   o Objects of class 'envelope', 'fv' and 'fasp' 
   Reduced computation time and storage required for these objects.
   
   o pcfmodel.kppm
   Improved calculation.

   o plot.fv
   Improved collision-avoidance algorithm
   (for avoiding overlaps between curves and legend)

   o ppm
   Improved error handling

   o envelope
   All methods for 'envelope' now handle fun=NULL   

   o setminus.owin
   Better handling of the case where both arguments are rectangles.

   o rmh
   Simulation has been further accelerated.

   o lppm
   Accelerated.

   o vcov.ppm
   Accelerated.

   o marktable
   Accelerated.

   o Triplets() interaction
   Accelerated.

   o alltypes
   Accelerated when envelope=TRUE.

BUG FIXES

   o rmh
   Simulation of the Geyer saturation process was incorrect.
   [Bug introduced in previous version, spatstat 1.31-0.]
   Fixed.

   o rmh
   Simulation of the Geyer saturation process was 
   incorrectly initialised, so that the results of a short run 
   (i.e. small value of 'nrep') were incorrect, 
   while long runs were correct.
   [Bug introduced in spatstat 1.17-0, october 2009.]
   Fixed.

   o ppm 
   Objects fitted with use.gam=TRUE caused fatal errors in
   various functions including print, summary, vcov and model.frame.
   Spotted by Jason Goldstick.
   Fixed.

   o lpp, runiflpp, rpoislpp
   Empty point patterns caused an error.
   Fixed.

   o rmh.default
   Crashed for hybrid models, with message 
   'Attempt to apply non-function'.
   Spotted by Ege Rubak.
   Fixed.

   o relrisk
   Crashed when 'at="points"' for a multitype pattern
   with more than 2 types.
   Spotted by Marcelino de la Cruz.
   Fixed.

   o erosion.owin, dilation.psp, border
   Ignored the arguments "..." in some cases
   (namely when the window was polygonal and 'gpclib' was disabled).
   Fixed.

   o rsyst, rcell
   Did not correctly handle the argument 'dx'.
   Spotted by Fabrice Vinatier.
   Fixed.

   o correction="trans"
   Various functions such as Kest 
   no longer recognised 'correction = "trans"'.
   Fixed.

   o istat
   Crashed with an error message about envelopes. 
   Fixed.

   o summary.ppm, print.ppm
   p-values which were exactly equal to zero were reported as NA.
   Fixed.

   o [.im
   Crashed if the intersection consisted of
   a single row or column of pixels.
   Fixed.

   o plot.im
   Sometimes incorrectly displayed an image consisting of 
   a single row or column of pixels.
   Fixed.

   o plot.layered
   The plot region was determined by the first layer,
   so that objects in subsequent layers could sometimes 
   fall outside the plot region.
   Fixed.

   o transect.im
   If the arguments 'from' and 'to' were numeric vectors of length 2,
   the result was garbled.
   Fixed.   

   o Inhomogeneous K functions and pair correlation functions
   [Kinhom, pcfinhom, Kcross.inhom, Kdot.inhom, pcfcross.inhom, etc.]
   These functions reported an error 'lambda is not a vector'
   if the intensity argument lambda was computed using density(, at="points").
   Fixed.

   o rlabel
   Did not accept a point pattern with a hyperframe of marks.
   Fixed.

   o alltypes
   Crashed when envelope=TRUE if the summary function 'fun'
   did not have default values for the marks i and j.
   Fixed.

   o Kres, Gres, psst, psstA
   Ignored the unit of length.
   Fixed.

	CHANGES IN spatstat VERSION 1.31-0

OVERVIEW

   o We thank Frederic Lavancier and Ege Rubak for contributions.

   o Major bug fix in simulation of area-interaction process.

   o Metropolis-Hastings simulations accelerated.

   o Rounding of spatial coordinates

   o clmfires dataset corrected.

   o Bug fixes and minor improvements.

NEW FUNCTIONS

   o round.ppp
   Round the spatial coordinates of a point pattern 
   to a specified number of decimal places.

   o rounding
   Determine whether a dataset has been rounded.

SIGNIFICANT USER-VISIBLE CHANGES

   o rmh
   Simulation of the following models has been accelerated:
   areaint, dgs, diggra, fiksel, geyer, hardcore, lennard, multihard,
   strauss, straush, straussm, strausshm.

   o rmh
   The transition history of the simulation (which is saved if 'track=TRUE')
   now also contains the value of the Hastings ratio for each proposal.

   o clmfires
   The clmfires dataset has been modified to remove errors and inconsistencies.

   o plot.linim
   Appearance of the plot has been improved, when style='width'.

   o summary.ppm
   Now reports whether the spatial coordinates have been rounded.

   o dclf.test, mad.test
   The range of distance values ('rinterval') used in the test
   is now printed in the test output, and is saved as an attribute.

BUG FIXES

   o rmh
   Simulation of the Area-Interaction model was completely incorrect.
   Spotted by Frederic Lavancier.
   The bug was introduced in spatstat version 1.23-6 or later.
   Fixed.

   o dclf.test
   The test statistic was incorrectly scaled (by a few percent).
   This did not affect the p-value of the test.
   Fixed.

   o ppx
   If argument 'coord.type' was missing, various errors occurred:
   a crash may have occurred, or the results may have depended
   on the storage type of the data. 
   Spotted by Ege Rubak.
   Fixed. 

   o plot.ppx
   Crashed for 1-dimensional point patterns.
   Spotted by Ege Rubak.
   Fixed.

	CHANGES IN spatstat VERSION 1.30-0


OVERVIEW 

   o We thank Jorge Mateu, Andrew Bevan, Olivier Flores, Marie-Colette van Lieshout, Nicolas Picard and Ege Rubak for contributions.

   o The spatstat manual now exceeds 1000 pages.

   o Hybrids of point process models.

   o Five new datasets

   o Second order composite likelihood method for kppm.

   o Inhomogeneous F, G and J functions.

   o Delaunay graph distance

   o Fixed serious bug in 'lppm' for marked patterns.

   o bug fix in some calculations for Geyer model

   o Improvements to linear networks code

   o Pixel images can now be displayed with a logarithmic colour map.

   o spatstat now formally 'Depends' on the R core package 'grDevices'

   o miscellaneous improvements and bug fixes

NEW DATASETS

   o clmfires
   Forest fires in Castilla-La Mancha

   o gordon
   People sitting on the grass in Gordon Square, London

   o hyytiala 
   Mixed forest in Hyytiala, Finland (marked by species)

   o paracou
   Kimboto trees in Paracou, French Guiana (marked as adult/juvenile)

   o waka
   Trees in Waka national park (marked with diameters)

NEW FUNCTIONS

   o Hybrid
   The hybrid of several point process interactions
   [Joint research with Jorge Mateu and Andrew Bevan]

   o is.hybrid
   Recognise a hybrid interaction or hybrid point process model.

   o Finhom, Ginhom, Jinhom
   Inhomogeneous versions of the F, G and J functions
   [Thanks to Marie-Colette van Lieshout]

   o delaunay.distance
   Graph distance in the Delaunay triangulation.

   o distcdf
   Cumulative distribution function of the distance between
   two independent random points in a given window.

   o bw.frac
   Bandwidth selection based on window geometry

   o shortside.owin, sidelengths.owin
   Side lengths of (enclosing rectangle of) a window

SIGNIFICANT USER-VISIBLE CHANGES

   o ppm
   Can now fit models with 'hybrid' interactions
   [Joint research with Jorge Mateu and Andrew Bevan]

   o kppm
   Now has the option of fitting models using Guan's (2006)
   second order composite likelihood.

   o envelope.lpp
   Now handles multitype point patterns.

   o envelope.envelope
   New argument 'transform' allows the user to apply a transformation
   to previously-computed summary functions.

   o runifpointOnLines, rpoisppOnLines, runiflpp, rpoislpp
   Can now generate multitype point patterns.

   o rmhmodel, rmh, simulate.ppm
   Now handle point process models with 'hybrid' interactions.

   o kppm
   Accelerated, and more reliable, due to better choice of starting values 
   in the optimisation procedure.

   o kppm
   The internal format of kppm objects has changed.

   o minimum contrast estimation
   Error messages from the optimising function 'optim' are now trapped
   and handled.

   o rhohat
   This command is now generic, with methods for ppp, quad, and ppm.

   o raster.x, raster.y, raster.xy
   These functions have a new argument 'drop'

   o summary.ppm
   Improved behaviour when the model covariates are a data frame.

   o progressreport
   Output improved.

   o second order summary functions
   (Kest, Lest, Kinhom, pcf.ppp, Kdot, Kcross, Ldot etc etc)
   These functions now accept correction="translation" as an 
   alternative to correction = "translate", for consistency.

   o plot.im
   New argument 'log' allows colour map to be equally spaced on a log scale.

   o as.owin.ppm, as.owin.kppm
   New argument 'from' allows the user to extract the spatial window
   of the point data (from="points") or the covariate images (from="covariates")

   o dclf.test, mad.test
   The rule for handling tied values of the test statistic has been changed.
   The tied values are now randomly ordered to obtain a randomised integer rank.

   o with.fv
   New argument 'enclos' allows evaluation in other environments

BUG FIXES

   o lppm
   For multitype patterns, the fitted model was completely incorrect
   due to an error in constructing the quadrature scheme.
   Fixed.

   o Geyer
   For point process models with the 'Geyer' interaction, 
   vcov.ppm() and suffstat() sometimes gave incorrect answers.
   [Spotted by Ege Rubak.]
   Fixed.

   o as.im.im
   Did not correctly handle factor-valued images
   if one of the arguments 'dimyx', 'eps', 'xy' was given.
   Fixed.

   o envelope.lppm
   Crashed if the model was multitype.
   Fixed.

   o lpp
   Did not handle empty patterns.
   Fixed.

   o density.ppp
   If 'sigma' was a bandwidth selection function such as bw.scott()
   which returned a numeric vector of length 2, a warning message was issued, 
   and the smoothing bandwidth was erroneously taken to be
   the first element of the vector.
   Fixed.

   o Fest, Jcross, Jdot, Jmulti
   If these functions were computed using correction = 'rs', 
   plotting them would sometimes give an error,      
   with the message "no finite x/y limits".
   Fixed.

   o pcfmodel.kppm
   For models with clusters="VarGamma"
   the value of the pcf at distance r=0 was given as NaN. 
   Fixed.

   o vcov.ppm
   Result was incorrect in rare cases, due to numerical rounding effects.
   Fixed.

   o rLGCP, simulate.kppm
   For models fitted to point patterns in an irregular window, 
   simulation sometimes failed, with a message that the image 'mu' 
   did not cover the simulation window.
   (Spotted by George Limitsios.)
   Fixed.

   o rLGCP, simulate.kppm
   Crashed sometimes with an error about unequal x and y steps
   (from 'GaussRF').
   Fixed.

	CHANGES IN spatstat VERSION 1.29-0

OVERVIEW 

   o We thank Colin Beale, Li Haitao, Frederic Lavancier, Erika Mudrak and Ege Rubak for contributions.

   o random sequential packing
 
   o Allard-Fraley estimator

   o method for pooling several quadrat tests

   o better control over dummy points in ppm

   o more support for data on a linear network

   o nearest neighbour map 

   o changes to subsetting of images

   o improvements and bug fixes 

NEW FUNCTIONS

   o clusterset
   Allard-Fraley estimator of high-density features in a point pattern

   o pool.quadrattest
   Pool several quadrat tests

   o nnfun
   Nearest-neighbour map of a point pattern or a line segment pattern

   o as.ppm
   Converts various kinds of objects to ppm

   o crossdist.lpp
   Shortest-path distances between pairs of points in a linear network

   o nobs.lppm
   Method for 'nobs' for lppm objects.

   o as.linim
   Converts various kinds of objects to 'linim'

   o model.images.slrm
   Method for model.images for slrm objects

   o rotate.im
   Rotate a pixel image

SIGNIFICANT USER-VISIBLE CHANGES

   o "[.im" and "[<-.im"
   New argument 'j' allows any type of matrix indexing to be used.

   o "[.im"
   Default behaviour changed in the case of a rectangular subset.
   New argument 'rescue' can be set to TRUE to reinstate previous behaviour.

   o rSSI
   Performs 'Random Sequential Packing' if n=Inf.

   o ppm
   New argument 'eps' determines the spacing between dummy points.
   (also works for related functions quadscheme, default.dummy, ...)

   o fitted.ppm, predict.ppm
   Argument 'new.coef' specifies a vector of parameter values
   to replace the fitted coefficients of the model.

   o lppm
   Stepwise model selection using step() now works for lppm objects.

   o vcov.slrm
   Can now calculate correlation matrix or Fisher information matrix
   as well as variance-covariance matrix.

   o eval.fv
   Improved behaviour when plotted.

   o "[.fv"
   Improved behaviour when plotted.

   o lohboot
   When the result is plotted, the confidence limits are now shaded.

   o lohboot
   New argument 'global' allows global (simultaneous) confidence bands
   instead of pointwise confidence intervals.

   o vcov.ppm
   Accelerated by 30% in some cases.

   o quadrat.test.splitppp
   The result is now a single object of class 'quadrattest'

   o progressreport
   Improved output (also affects many functions which print progress reports)

   o Full redwood data (redwoodfull)
   Plot function redwoodfull.extra$plotit has been slightly improved.

   o nncross
   This function is now generic, with methods for 'ppp' and 'default'.

   o distfun
   The internal format of objects of class 'distfun' has been changed.

   o duplicated.ppp, unique.ppp   
   New argument 'rule' allows behaviour to be consistent with package 'deldir'

BUG FIXES

   o bdist.tiles
   Values were incorrect in some cases due to numerical error.
   (Spotted by Erika Mudrak.)
   Fixed.

   o vcov.ppm, suffstat
   These functions sometimes gave incorrect values 
   for marked point process models.
   Fixed.

   o simulate.ppm, predict.ppm
   Did not correctly handle the 'window' argument. (Spotted by Li Haitao).
   Fixed.

   o smooth.ppp, markmean
   If sigma was very small, strange values were produced, due to
   numerical underflow. (Spotted by Colin Beale).
   Fixed.

   o MultiHard, MultiStrauss, MultiStraussHard
   Crashed if the data point pattern was empty.
   (Spotted by Ege Rubak).
   Fixed.

   o vcov.ppm
   Crashed sporadically, with multitype interactions.
   (Spotted by Ege Rubak).
   Fixed.

   o rStrauss, rHardcore, rStraussHard, rDiggleGratton, rDGS
   If the simulated pattern was empty, these functions would either
   crash, or return a pattern containing 1 point.
   (Spotted by Frederic Lavancier).
   Fixed.

   o model.matrix.slrm
   Crashed if the model was fitted using split pixels.
   Fixed.

   o residuals.ppm, diagnose.ppm
   Did not always correctly handle models that included offset terms.
   Fixed.

   o project.ppm
   When a model was projected by project.ppm or by ppm(project=TRUE),
   the edge corrections used the projected models were sometimes different
   from the edge corrections in the original model, so that the 
   projected and unprojected models were not comparable.
   Fixed.

   o plot.listof, plot.splitppp
   Crashed sometimes due to a scoping problem.
   Fixed.

   o dclf.test, mad.test
   Crashed if any of the function values were infinite or NaN.
   Fixed.

   o psstA
   Default plot did not show the horizontal line at y=0
   corresponding to a perfect fit.
   Fixed.

   o vcov.ppm
   names attribute was spelt incorrectly in some cases.
   Fixed.


	CHANGES IN spatstat VERSION 1.28-2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           