<CRANTaskView>
  <name>Spatial</name>
  <topic>Analysis of Spatial Data</topic>
  <maintainer email="Roger.Bivand@nhh.no">Roger Bivand</maintainer>
  <version>2016-09-07</version>

  <info>
    <p>Base R includes many functions that can be used for reading,
    visualising, and analysing spatial data. The focus in this view is on
    "geographical" spatial data, where observations can be identified
    with geographical locations, and where additional information about
    these locations may be retrieved if the location is recorded with
    care. Base R functions are complemented by contributed packages,
    some of which are on CRAN, and others are still in development. One
    active location is <a href="http://R-Forge.R-project.org/">
    R-Forge</a>, which lists "Spatial Data and Statistics" projects in its
    <a href="http://R-Forge.R-project.org/softwaremap/trove_list.php">project
    tree</a>. Information on R-spatial packages, especially <pkg>sp</pkg> 
    is posted on the R-Forge rspatial project 
    <a href="http://rspatial.R-Forge.R-project.org/">website</a>, including
    a visualisation gallery. Active development of <pkg>sp</pkg> is 
    continuing on <a href="https://github.com/edzer/sp">Github</a>.</p>

    <p>The contributed packages address two broad areas: moving spatial data
    into and out of R, and analysing spatial data in R.</p>

    <p>The <a href="https://stat.ethz.ch/mailman/listinfo/R-SIG-Geo/">
    R-SIG-Geo</a> mailing-list is a good place to begin for obtaining help
    and discussing questions about both accessing data, and analysing it.
    The mailing list is a good place to search for information about
    relevant courses. Further information about courses may be found
    under the "Events" tab of <a href="http://r-spatial.org/">this blog</a>.
    </p>

    There are a number of contributed tutorials and introductions; 
    a recent one is 
    <a href="https://cran.r-project.org/doc/contrib/intro-spatial-rl.pdf">
    Introduction to visualising spatial data in R</a> by Robin Lovelace 
    and James Cheshire.

    <p>The packages in this
    view can be roughly structured into the following topics. If you think
    that some package is missing from the list, please let me know.
    </p>
    <ul>

      <li><p><b>Classes for spatial data</b>: Because many of the
      packages importing and using spatial data have had to include
      objects of storing data and functions for visualising it,
      an initiative is in progress to construct shared classes
      and plotting functions for spatial data.
      The <pkg>sp</pkg> package is discussed in a note in
      <a href="http://CRAN.R-project.org/doc/Rnews/Rnews_2005-2.pdf">R
      News</a>.  Many other packages have become dependent on these
      classes, including <pkg>rgdal</pkg> and <pkg>maptools</pkg>. 
      The <pkg>rgeos</pkg> package provides an interface to topology functions
      for <pkg>sp</pkg> objects using 
      <a href="http://trac.osgeo.org/geos/">GEOS</a>.
      The <pkg>stplanr</pkg> provides a "SpatialLinesNetwork" class based on 
      objects defined in <pkg>sp</pkg> and <pkg>igraph</pkg> that can be used 
      for routing analysis within R. Another network package is
      <pkg>shp2graph</pkg>. The <pkg>cleangeo</pkg> may be used to 
      inspect spatial objects, facilitate handling and reporting of topology 
      errors and geometry validity issues. It claims to provide a geometry
      cleaner that will fix all geometry problems, and eliminate (at least
      reduce) the likelihood of having issues when doing spatial data
      processing.
      The <pkg>raster</pkg> package is a major extension of spatial data 
      classes to virtualise access to large rasters, permitting large 
      objects to be analysed, and extending the analytical tools available 
      for both raster and vector data. Used with <pkg>rasterVis</pkg>, it
      can also provide enhanced visualisation and interaction. The 
      <pkg>spatial.tools</pkg> package contains spatial functions meant to 
      enhance the core functionality of the <pkg>raster</pkg> package, 
      including a parallel processing engine for use with rasters.
      The <pkg>micromap</pkg> package provides linked micromaps using
      ggplot2. The <pkg>recmap</pkg> package provides rectangular 
      cartograms with rectangle sizes reflecting for example population; the 
      <pkg>statebins</pkg> privides a simpler binning approach to US states.
      The <pkg>spacetime</pkg> package 
      extends the shared classes defined in <pkg>sp</pkg> for 
      spatio-temporal data (see <a href="http://www.jstatsoft.org/v51/i07">Spatio-Temporal Data in R</a>). The <pkg>Grid2Polygons</pkg> converts a 
      spatial object from class SpatialGridDataFrame to 
      SpatialPolygonsDataFrame.</p>

      <p>An
      alternative approach to some of these issues is implemented in
      the <pkg>PBSmapping</pkg> package; <pkg>PBSmodelling</pkg> provides
      modelling support. In addition, <pkg>GEOmap</pkg> provides mapping
      facilities directed to meet the needs of geologists, and uses the
      <pkg>geomapdata</pkg> package.</p>
      </li>

      <li><p><b>Handling spatial data</b>: A number of packages have
      been written using sp classes. The <pkg>raster</pkg> package 
      introduces many GIS methods that now permit much to be done with 
      spatial data without having to use GIS in addition to R. It may be
      complemented by <pkg>gdistance</pkg>, which provided calculation
      of distances and routes on geographic grids. <pkg>geosphere</pkg>
      permits computations of distance and area 
      to be carried out on spatial data in geographical coordinates. 
      The <pkg>dggridR</pkg> package provides an interface to DGGRID for
      working with discrete global grids, using hexagons, triangles, and
      diamonds to overcome the issue that every bin have the same area.
      The <pkg>spsurvey</pkg> package provides a
      range of sampling functions. The <pkg>trip</pkg> package extends sp
      classes to permit the accessing and manipulating of spatial data for
      animal tracking. The <pkg>hdeco</pkg> package provides hierarchical
      decomposition of entropy for categorical map comparisons. The
      <pkg>GeoXp</pkg> package permits interactive graphical exploratory
      spatial data analysis. <pkg>spcosa</pkg> provides spatial coverage
      sampling and random sampling from compact geographical strata. 
      The <pkg>magclass</pkg> offers a data class for increased
      interoperability working with spatial-temporal data together with
      corresponding functions and methods (conversions, basic calculations
      and basic data manipulation). The class distinguishes between spatial,
      temporal and other dimensions to facilitate the development and
      interoperability of tools build for it. Additional features are
      name-based addressing of data and internal consistency checks (e.g.
      checking for the right data order in calculations).</p>

      <p>The UScensus2000 suite of packages (<pkg>UScensus2000cdp</pkg>, <pkg>UScensus2000tract</pkg>) makes the
      use of data from the 2000 US Census more convenient. An important
      data set, Guerry's "Moral Statistics of France", has been made
      available in the <pkg>Guerry</pkg> package, which provides data
      and maps and examples designed to contribute to the integration
      of multivariate and spatial analysis.
      The <pkg>marmap</pkg> package is designed for downloading, plotting
      and manipulating bathymetric and topographic data in R. <pkg>marmap</pkg>
      can query the ETOPO1 bathymetry and topography database hosted by the
      NOAA, use simple latitude-longitude-depth data in ascii format, and take
      advantage of the advanced plotting tools available in R to build
      publication-quality bathymetric maps (see the <a href="http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0073051">PLOS</a>
      paper). Modern country boundaries are
      provided at 2 resolutions by <pkg>rworldmap</pkg> along with
      functions to join and map tabular data referenced by country
      names or codes. Chloropleth and bubble maps are supported and general
      functions to work on user supplied maps (see <a href="http://journal.r-project.org/archive/2011-1/RJournal_2011-1_South.pdf">A New R package for Mapping Global Data</a>. Higher resolution country
      borders are available from the linked package <pkg>rworldxtra</pkg>.
      Historical country boundaries (1946-2012) can be obtained from the
      <pkg>cshapes</pkg> package along with functions for calculating
      distance matrices (see <a href="http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Weidmann+Skrede~Gleditsch.pdf">Mapping and Measuring Country Shapes</a>).</p>
      <p>The <pkg>landsat</pkg> package with accompanying 
      <a href="http://www.jstatsoft.org/v43/i04">JSS paper</a> provides
      tools for exploring and developing correction tools for remote
      sensing data. <pkg>taRifx</pkg> is a collection of utility and 
      convenience functions, and some interesting spatial functions.
      The <pkg>gdalUtils</pkg> package provides wrappers for the Geospatial
      Data Abstraction Library (GDAL) Utilities. The <pkg>geoaxe</pkg> allows
      users to split 'geospatial' objects into pieces. Includes support for
      some spatial object inputs, 'Well-Known Text', and 'GeoJSON'. The 
      <pkg>lawn</pkg> package is a client for 'Turfjs' 
      for 'geospatial' analysis. The package revolves around using 'GeoJSON'
      data. Functions are included for creating 'GeoJSON' data objects,
      measuring aspects of 'GeoJSON', and combining, transforming, and
      creating random 'GeoJSON' data objects.
      </p></li>

      <li><p><b>Reading and writing spatial data - <pkg>rgdal</pkg></b>:
      Maps may be
      vector-based or raster-based. The <pkg>rgdal</pkg> package provides
      bindings to <a href="http://www.gdal.org/">GDAL</a>-supported raster
      formats and <a href="http://www.gdal.org/ogr/">OGR</a>-supported
      vector formats. It contains functions to write raster
      files in supported formats. The package also provides <a
      href="http://trac.osgeo.org/proj/">PROJ.4</a> projection
      support for vector objects 
      (<a href="http://spatialreference.org">this site</a> provides 
      searchable online PROJ.4 representations of projections). 
      Affine and similarity transformations on sp objects may be made
      using functions in the <pkg>vec2dtransf</pkg> package.
      The Windows and Mac OSX CRAN binaries of <pkg>rgdal</pkg>
      include subsets of possible data source drivers; if others
      are needed, use other conversion utilities, or install from source
      against a version of GDAL with the required drivers. 
      The <pkg>rgeos</pkg> package provides functions for 
      reading and writing well-known text (WKT) geometry, and the 
      <pkg>wkb</pkg> package provides functions for reading and writing 
      well-known binary (WKB) geometry.</p></li>

      <li><p><b>Reading and writing spatial data - other packages</b>:
      There are a
      number of other packages for accessing vector data on CRAN:
      <pkg>maps</pkg> (with <pkg>mapdata</pkg> and <pkg>mapproj</pkg>)
      provides access to the same kinds of geographical databases as S -
      <pkg>RArcInfo</pkg> allows ArcInfo v.7 binary files and *.e00
      files to be read, and <pkg>maptools</pkg> and <pkg>shapefiles</pkg>
      read and write ArcGIS/ArcView shapefiles; for NetCDF files,
      <pkg>ncdf4</pkg> or <pkg>RNetCDF</pkg> may be used.
      The <pkg>maptools</pkg>
      package also provides helper functions for writing map polygon
      files to be read by WinBUGS, Mondrian, and the tmap command
      in Stata. It also provides interface functions between
      <pkg>PBSmapping</pkg> and <pkg>spatstat</pkg> and sp classes,
      in addition to <pkg>maps</pkg> databases and sp classes. There is
      also an interface to GSHHS shoreline databases. The <pkg>gmt</pkg> 
      package gives a simple interface between GMT
      map-making software and R. <pkg>geonames</pkg> is an interface to 
      the <a href="http://www.geonames.org/">www.geonames.org</a> service.
      <pkg>OpenStreetMap</pkg> gives access to open street map raster images, 
      and <pkg>osmar</pkg> provides infrastructure to access OpenStreetMap 
      data from different sources, to work with the data in common R manner, 
      and to convert data into available infrastructure provided by 
      existing R packages.</p>

      <p>The <pkg>rpostgis</pkg> package provides additional functions to the
      'RPostgreSQL' package to interface R with a 'PostGIS'-enabled database,
      as well as convenient wrappers to common 'PostgreSQL' queries. The
      <pkg>postGIStools</pkg> package provides functions to convert geometry
      and 'hstore' data types from 'PostgreSQL' into standard R objects,
      as well as to simplify the import of R data frames (including spatial
      data frames) into 'PostgreSQL'</p>

      <p>Integration with version 6.* and of the leading open source
      GIS, GRASS, is provided in CRAN package <pkg>spgrass6</pkg>, using
      <pkg>rgdal</pkg> for exchanging data. 
      For GRASS 7.*, use <pkg>rgrass7</pkg>. <pkg>RPyGeo</pkg> is a wrapper
      for Python access to the ArcGIS GeoProcessor, and <pkg>RSAGA</pkg>
      is a similar shell-based wrapper for SAGA commands. The <pkg>RQGIS</pkg>
      package establishes an interface between R and QGIS, i.e. it allows
      the user to access QGIS functionalities from the R console. It achieves
      this by using the QGIS Python API via the command line. Note also
      <a href="https://stat.ethz.ch/pipermail/r-sig-geo/2016-August/024817.html">this thread</a> on an alternative R/QGIS integration.</p></li>

     <li><p><b>Visualisation</b>:
      For visualization, the colour palettes provided in
      the <pkg>RColorBrewer</pkg> package are very useful, and may
      be modified or extended using the <code>colorRampPalette</code>
      function provided with R. The <pkg>classInt</pkg> package provides
      functions for choosing class intervals for thematic cartography.
      The <pkg>tmap</pkg> package proveds a modern basis for thematic mapping
      optionally using a Grammar of Graphics syntax. Because it has a custom
      grid graphics platform, it obviates the need to fortify geometries to 
      use with ggplot2. The <pkg>mapview</pkg> package provides methods to
      view spatial objects interactively, usually on a web mapping base.
      The <pkg>quickmapr</pkg> package
      provides a simple method to visualize 'sp' and 'raster' objects,
      allows for basic zooming, panning, identifying, and labeling of
      spatial objects, and does not require that the data be in geographic
      coordinates. The <pkg>cartography</pkg> package allows various
      cartographic representations such as proportional symbols,
      choropleth, typology, flows or discontinuities. The <pkg>mapmisc</pkg>
      package is a minimal, light-weight set of tools for producing nice
      looking maps in R, with support for map projections.If the
      user wishes to place a map backdrop behind other displays, the the
      <pkg>RgoogleMaps</pkg> package for accessing 
      Google Maps(TM) may be useful. <pkg>ggmap</pkg> may be used for 
      spatial visualisation with Google Maps and OpenStreetMap.
      The <pkg>plotGoogleMaps</pkg> package provides methods for the 
      visualisation of spatial and spatio-temporal objects in Google Maps in
      a web browser. <pkg>plotKML</pkg> is a package providing methods for
      the visualisation of spatial and spatio-temporal objects in Google
      Earth. A further option is <pkg>leafletR</pkg>, which provides basic
      web-mapping functionality to combine vector data files and online
      map tiles from different sources.</p></li>

      <li><p><b>Point pattern analysis</b>: The <pkg>spatial</pkg>
      package is a recommended package shipped with base R, and contains
      several core functions, including an implementation of Khat
      by its author, Prof. Ripley. In addition, <pkg>spatstat</pkg>
      allows freedom in defining the region(s) of interest, and makes
      extensions to marked processes and spatial covariates. Its
      strengths are model-fitting and simulation, and it has a useful
      <a href="http://www.spatstat.org/"> homepage</a>. It is the only
      package that will enable the user to fit inhomogeneous point process
      models with interpoint interactions.
      The <pkg>spatgraphs</pkg>
      package provides graphs, graph visualisation and graph based
      summaries to be used with spatial point pattern analysis. The
      <pkg>splancs</pkg> package also allows point data to be analysed
      within a polygonal region of interest, and covers many methods,
      including 2D kernel densities. </p>

      <p><pkg>ecespa</pkg> provides
      wrappers, functions and data for spatial point pattern analysis,
      used in the book on Spatial Ecology of the ECESPA/AEET. The
      functions for binning points on grids in <pkg>ash</pkg> may
      also be of interest. The <pkg>ads</pkg> package perform first-
      and second-order multi-scale analyses derived from Ripley's
      K-function. The <pkg>aspace</pkg> package is a collection of
      functions for estimating centrographic statistcs and computational
      geometries from spatial point patterns.
      <pkg>spatialkernel</pkg> provides edge-corrected kernel density 
      estimation and binary kernel
      regression estimation for multivariate spatial point process data.
      <pkg>DSpat</pkg> contains functions for spatial modelling
      for distance sampling data and <pkg>spatialsegregation</pkg> 
      provides segregation measures for multitype spatial point 
      patterns. <pkg>GriegSmith</pkg> uses the Grieg-Smith method on 
      2 dimensional spatial data. The <pkg>dbmss</pkg> package allows 
      simple computation of a full set of spatial statistic functions of 
      distance, including classical ones (Ripley's K and others) and more 
      recent ones used by spatial economists (Duranton and Overman's Kd, 
      Marcon and Puech's M). It relies on spatstat for core 
      calculation. <pkg>latticeDensity</pkg> contains functions that compute
      the lattice-based density estimator of Barry and McIntyre, which
      accounts for point processes in two-dimensional regions with
      irregular boundaries and holes.</p></li>

      <li><p><b>Geostatistics</b>: The <pkg>gstat</pkg> package
      provides a wide range of functions for univariate and multivariate
      geostatistics, also for larger datasets, while <pkg>geoR</pkg>
      and <pkg>geoRglm</pkg> contain functions for model-based
      geostatistics. Variogram diagnostics may be carried out with 
      <pkg>vardiag</pkg>. Automated interpolation using <pkg>gstat</pkg>
      is available in <pkg>automap</pkg>. This family of packages is
      supplemented by <pkg>intamap</pkg> with procedures for automated
      interpolation and <pkg>psgp</pkg>, which implements projected
      sparse Gaussian process kriging.  A similar wide range of
      functions is to be found in the <pkg>fields</pkg> package. The
      <pkg>spatial</pkg> package is shipped with base R, and contains
      several core functions. The <pkg>spBayes</pkg> package fits Gaussian
      univariate and multivariate models with MCMC. <pkg>ramps</pkg>
      is a different Bayesian geostatistical modelling package.
      The <pkg>geospt</pkg> package contains some geostatistical and radial
      basis functions, including prediction and cross validation. Besides, 
      it includes functions for the design of optimal spatial sampling 
      networks based on geostatistical modelling. The <pkg>geostatsp</pkg>
      package offers geostatistical modelling facilities using Raster and
      SpatialPoints objects are provided. Non-Gaussian models are fit
      using INLA, and Gaussian geostatistical models use Maximum Likelihood
      Estimation.</p>

      <p>The <pkg>RandomFields</pkg> package provides functions for
      the simulation and analysis of random fields, and variogram
      model descriptions can be passed between <pkg>geoR</pkg>,
      <pkg>gstat</pkg> and this package. <pkg>SpatialExtremes</pkg>
      proposes several approaches for spatial extremes modelling
      using <pkg>RandomFields</pkg>. In addition, <pkg>CompRandFld</pkg>, 
      <pkg>constrainedKriging</pkg> and <pkg>geospt</pkg> provide 
      alternative approaches to geostatistical modelling. The 
      <pkg>spTimer</pkg> package  is able to fit, spatially predict and 
      temporally forecast large amounts of space-time data using [1] 
      Bayesian Gaussian Process (GP) Models, [2] Bayesian Auto-Regressive 
      (AR) Models, and [3] Bayesian Gaussian Predictive Processes (GPP) 
      based AR Models. The <pkg>rtop</pkg> package provides functions for 
      the geostatistical interpolation of data with irregular spatial 
      support such as runoff related data or data from administrative 
      units. The <pkg>georob</pkg> package provides functions for fitting 
      linear models with spatially correlated errors by robust and Gaussian 
      Restricted Maximum Likelihood and for computing robust and customary 
      point and block kriging predictions, along with utility functions for 
      cross-validation and for unbiased back-transformation of kriging 
      predictions of log-transformed data. The <pkg>SpatialTools</pkg> 
      package has an emphasis on kriging, and provides functions for 
      prediction and simulation.</p>

      <p>The <pkg>sgeostat</pkg> package
      is also available. Within the same general topical area are
      the <pkg>deldir</pkg> and <pkg>tripack</pkg> packages for
      triangulation and the <pkg>akima</pkg> package for spline
      interpolation; the <pkg>MBA</pkg> package provides scattered
      data interpolation with multilevel B-splines. In addition,
      there are the <pkg>spatialCovariance</pkg> package, which
      supports the computation of spatial covariance matrices
      for data on rectangles, the <pkg>regress</pkg> package
      building in part on <pkg>spatialCovariance</pkg>, and the
      <pkg>tgp</pkg> package. The <pkg>Stem</pkg> package provides
      for the estimation of the parameters of a spatio-temporal
      model using the EM algorithm, and the estimation of the
      parameter standard errors using a spatio-temporal parametric
      bootstrap. <pkg>FieldSim</pkg> is another random fields
      simulations package. The <pkg>SSN</pkg> is for geostatistical 
      modeling for data on stream networks, including models based on 
      in-stream distance. Models are created using moving average 
      constructions. Spatial linear models, including covariates, can be 
      fit with ML or REML. Mapping and other graphical functions are 
      included. The <pkg>ipdw</pkg> provides functions o interpolate 
      georeferenced point data via Inverse Path Distance Weighting. Useful 
      for coastal marine applications where barriers in the landscape 
      preclude interpolation with Euclidean distances.
      <pkg>RSurvey</pkg> may be used as a processing program for spatially
      distributed data, and is capable of error corrections and data
      visualisation.</p></li>

      <li><p><b>Disease mapping and areal data analysis</b>:
      <pkg>DCluster</pkg> is a package for the detection of
      spatial clusters of diseases. It extends and  depends on the
      <pkg>spdep</pkg> package, which provides basic functions for
      building neighbour lists and spatial weights, tests for spatial
      autocorrelation for areal data like Moran's I, and functions for
      fitting spatial regression models, such as SAR and CAR models. These
      models assume that the spatial dependence can be described by known
      weights. The <pkg>SpatialEpi</pkg> package provides implementations of
      cluster detection and disease mapping functions, including Bayesian
      cluster detection, and supports strata. The <pkg>diseasemapping</pkg>
      package offers the formatting of population and case data, calculation
      of Standardized Incidence Ratios, and fitting the BYM model using
      INLA. Regionalisation of polygon
      objects is provided by <pkg>AMOEBA</pkg>: a function to calculate
      spatial clusters using the Getis-Ord local statistic. It searches
      irregular clusters (ecotopes) on a map, and by <code>skater</code>
      in <pkg>spdep</pkg>. The <pkg>seg</pkg> and <pkg>OasisR</pkg> packages
      provide functions for measuring spatial segregation; <pkg>OasisR</pkg>
      includes Monte Carlo simulations to test the indices.
      The <pkg>spgwr</pkg> package contains an implementation of
      geographically weighted regression methods for exploring possible
      non-stationarity. The <pkg>gwrr</pkg> package fits geographically
      weighted regression (GWR) models and has tools to diagnose and 
      remediate collinearity in the GWR models. Also fits geographically 
      weighted ridge regression (GWRR) and geographically weighted lasso 
      (GWL) models. The <pkg>GWmodel</pkg> package contains functions for 
      computing geographically weighted models. The <pkg>lctools</pkg> 
      package provides researchers and educators with easy-to-learn user
      friendly tools for calculating key spatial statistics and to apply
      simple as well as advanced methods of spatial analysis in real data.
      These include: Local Pearson and Geographically Weighted Pearson
      Correlation Coefficients, Spatial Inequality Measures (Gini, Spatial
      Gini, LQ, Focal LQ), Spatial Autocorrelation (Global and Local
      Moran's I), several Geographically Weighted Regression techniques and
      other Spatial Analysis tools (other geographically weighted statistics).
      This package also contains functions for measuring the significance of
      each statistic calculated, mainly based on Monte Carlo simulations.
      The <pkg>sparr</pkg> package provides another
      approach to relative risks. The <pkg>CARBayes</pkg> package 
      implements Bayesian hierarchical spatial areal unit models. In 
      such models the spatial correlation is modelled by a set of random 
      effects, which are assigned a conditional autoregressive (CAR) prior 
      distribution. Examples of the models included are the BYM model as 
      well as a recently developed localised spatial smoothing model.
      The <pkg>glmmBUGS</pkg> package is a helpful way of passing out spatial
      models to WinBUGS. The <pkg>spaMM</pkg> package fits spatial GLMMs,
      using the Matern correlation function as the basic model for spatial
      random effects. The <pkg>PReMiuM</pkg> package is for profile 
      regression, which is a Dirichlet process Bayesian clustering model;
      it provides a spatial CAR term that can be included in the fixed
      effects (which are global, ie. non cluster specific, parameters)
      to account for any spatial correlation in the residuals.
      The <pkg>spacom</pkg> package provides tools to
      construct and exploit spatially weighted context data, and further
      allows combining the resulting spatially weighted context data with
      individual-level predictor and outcome variables, for the purposes
      of multilevel modelling.
      The <pkg>geospacom</pkg> package generates
      distance matrices from shape files and represents spatially weighted
      multilevel analysis results. Spatial survival analysis is provided by
      the <pkg>spatsurv</pkg> - Bayesian inference for parametric proportional
      hazards spatial survival models - and <pkg>spBayesSurv</pkg> - Bayesian
      Modeling and Analysis of Spatially Correlated Survival Data - packages.
      The <pkg>spselect</pkg> package provides modelling functions based on
      forward stepwise regression, incremental forward stagewise regression,
      least angle regression (LARS), and lasso models for selecting the
      spatial scale of covariates in regression models.
      </p></li>

      <li><p><b>Spatial regression</b>:
      The choice of function for spatial regression will depend on the 
      support available. If the data are characterised by point support
      and the spatial process is continuous, geostatistical methods may be 
      used, or functions in the <pkg>nlme</pkg> package. If the support
      is areal, and the spatial process is not being treated as continuous,
      functions provided in the <pkg>spdep</pkg> package may be used.
      This package can also be seen as providing spatial econometrics
      functions, and, as noted above, provides basic functions for
      building neighbour lists and spatial weights, tests for spatial
      autocorrelation for areal data like Moran's I, and functions for
      fitting spatial regression models. It provides the full range of
      local indicators of spatial association, such as local Moran's I and
      diagnostic tools for fitted linear models, including Lagrange
      Multiplier tests. Spatial regression models that can be fitted using
      maximum likelihood include spatial lag models, spatial error models,
      and spatial Durbin models. For larger data sets, sparse matrix 
      techniques can be used for maximum likelihood fits, while spatial two
      stage least squares and generalised method of moments estimators are
      an alternative. When using GMM, <pkg>sphet</pkg> can be used to 
      accommodate both autocorrelation and heteroskedasticity. Spatial 
      count regression is provided using custom MCMC
      by <pkg>spatcounts</pkg>. The <pkg>McSpatial</pkg> provides functions 
      for locally weighted regression, semiparametric and conditionally 
      parametric regression, fourier and cubic spline functions, GMM and 
      linearized spatial logit and probit, k-density functions and 
      counterfactuals, nonparametric quantile regression and conditional 
      density functions, Machado-Mata decomposition for quantile 
      regressions, spatial AR model, repeat sales models, and 
      conditionally parametric logit and probit.
      The <pkg>splm</pkg> package provides methods for 
      fitting spatial panel data by maximum likelihood and GM. The two 
      small packages <pkg>S2sls</pkg> and <pkg>spanel</pkg> provide 
      alternative implementations without most of the facilities of 
      <pkg>splm</pkg>. The <pkg>HSAR</pkg> package provides Hierarchical
      Spatial Autoregressive Models (HSAR), based on a Bayesian Markov Chain
      Monte Carlo (MCMC) algorithm.
      <pkg>spatialprobit</pkg> make possible Bayesian estimation of the 
      spatial autoregressive probit model (SAR probit model). The 
      <pkg>ProbitSpatial</pkg> package provides methods for fitting Binomial
      spatial probit models to larger data sets; spatial autoregressive
      (SAR) and spatial error (SEM) probit models are included.</p></li>

      <li><p><b>Ecological analysis</b>: There are many packages
      for analysing ecological and environmental data. They include
      <pkg>ade4</pkg> for exploratory and Euclidean methods in the
      environmental sciences,  the <pkg>adehabitat</pkg> family of packages 
      for the analysis of habitat selection by animals
      (<pkg>adehabitatHR</pkg>, <pkg>adehabitatHS</pkg>,
      <pkg>adehabitatLT</pkg>, and <pkg>adehabitatMA</pkg>),
      <pkg>pastecs</pkg> for the
      regulation, decomposition and analysis of space-time series,
      <pkg>vegan</pkg> for ordination methods and other useful
      functions for community and vegetation ecologists, and many
      other functions in other contributed packages. One such is
      <pkg>tripEstimation</pkg>, basing on the classes provided by
      <pkg>trip</pkg>. <pkg>ncf</pkg> has entered CRAN recently, and
      provides a range of spatial nonparametric covariance functions.
      <pkg>rangeMapper</pkg> is a package to manipulate species range
      (extent-of-occurrence) maps, mainly tools for easy generation of
      biodiversity (species richness) or life-history traits maps. The
      <pkg>siplab</pkg> package is a platform for experimenting with
      spatially explicit individual-based vegetation models.
      <pkg>ModelMap</pkg> builds on other packages to create models
      using underlying GIS data. The <pkg>SpatialPosition</pkg> computes
      spatial position models: Stewart potentials, Reilly catchment areas,
      Huff catchment areas. The <pkg>Watersheds</pkg> package provides
      methods for watersheds aggregation and spatial drainage network
      analysis.

      An off-CRAN package
      - <a href="http://www.leg.ufpr.br/Rcitrus/">Rcitrus</a> - is for
      the spatial analysis of plant disease incidence.
      The <pkg>Geneland</pkg> package uses <pkg>fields</pkg> and 
      <pkg>RandomFields</pkg> to make use of both geographic and genetic
      informations to estimate the number of populations in a dataset and
      delineate their spatial organisation. The <pkg>ngspatial</pkg> package 
      provides tools for analyzing spatial data, especially non-Gaussian 
      areal data. It supports the sparse spatial generalized linear mixed 
      model of Hughes and Haran (2013) and the centered autologistic model 
      of Caragea and Kaiser (2009).
      The <a href="Environmetrics.html">Environmetrics</a> Task
      View contains a much more complete survey of relevant functions
      and packages.</p></li>
    </ul>
  </info>

  <packagelist>
    <pkg>ade4</pkg>
    <pkg>adehabitat</pkg>
    <pkg>adehabitatHR</pkg>
    <pkg>adehabitatHS</pkg>
    <pkg>adehabitatLT</pkg>
    <pkg>adehabitatMA</pkg>
    <pkg>ads</pkg>
    <pkg>akima</pkg>
    <pkg>AMOEBA</pkg>
    <pkg>aspace</pkg>
    <pkg>ash</pkg>
    <pkg>automap</pkg>
    <pkg>CARBayes</pkg>
    <pkg>cartography</pkg>
    <pkg priority="core">classInt</pkg>
    <pkg>cleangeo</pkg>
    <pkg>CompRandFld</pkg>
    <pkg>constrainedKriging</pkg>
    <pkg>cshapes</pkg>
    <pkg>dbmss</pkg>
    <pkg priority="core">DCluster</pkg>
    <pkg priority="core">deldir</pkg>
    <pkg priority="core">dggridR</pkg>
    <pkg>diseasemapping</pkg>
    <pkg>DSpat</pkg>
    <pkg>ecespa</pkg>
    <pkg>fields</pkg>
    <pkg>FieldSim</pkg>
    <pkg>gdalUtils</pkg>
    <pkg>gdistance</pkg>
    <pkg>Geneland</pkg>
    <pkg>geoaxe</pkg>
    <pkg>GEOmap</pkg>
    <pkg>geomapdata</pkg>
    <pkg>geonames</pkg>
    <pkg>georob</pkg>
    <pkg priority="core">geoR</pkg>
    <pkg>geoRglm</pkg>
    <pkg>geospacom</pkg>
    <pkg>geosphere</pkg>
    <pkg>geospt</pkg>
    <pkg>geostatsp</pkg>
    <pkg>GeoXp</pkg>
    <pkg>ggmap</pkg>
    <pkg>glmmBUGS</pkg>
    <pkg>gmt</pkg>
    <pkg>Grid2Polygons</pkg>
    <pkg>GriegSmith</pkg>
    <pkg priority="core">gstat</pkg>
    <pkg>Guerry</pkg>
    <pkg>GWmodel</pkg>
    <pkg>gwrr</pkg>
    <pkg>hdeco</pkg>
    <pkg>HSAR</pkg>
    <pkg>igraph</pkg>
    <pkg>intamap</pkg>
    <pkg>ipdw</pkg>
    <pkg>landsat</pkg>
    <pkg>latticeDensity</pkg>
    <pkg>lawn</pkg>
    <pkg>lctools</pkg>
    <pkg>leafletR</pkg>
    <pkg>magclass</pkg>
    <pkg>mapdata</pkg>
    <pkg>mapmisc</pkg>
    <pkg>mapproj</pkg>
    <pkg>maps</pkg>
    <pkg priority="core">maptools</pkg>
    <pkg>mapview</pkg>
    <pkg>marmap</pkg>
    <pkg>MBA</pkg>
    <pkg>McSpatial</pkg>
    <pkg>micromap</pkg>
    <pkg>ModelMap</pkg>
    <pkg>pastecs</pkg>
    <pkg>ncdf4</pkg>
    <pkg>ncf</pkg>
    <pkg>ngspatial</pkg>
    <pkg>nlme</pkg>
    <pkg>OasisR</pkg>
    <pkg>OpenStreetMap</pkg>
    <pkg>osmar</pkg>
    <pkg>PBSmapping</pkg>
    <pkg>PBSmodelling</pkg>
    <pkg>plotGoogleMaps</pkg>
    <pkg>plotKML</pkg>
    <pkg>postGIStools</pkg>
    <pkg>PReMiuM</pkg>
    <pkg>ProbitSpatial</pkg>
    <pkg>psgp</pkg>
    <pkg>quickmapr</pkg>
    <pkg>ramps</pkg>
    <pkg priority="core">RandomFields</pkg>
    <pkg>rangeMapper</pkg>
    <pkg>RArcInfo</pkg>
    <pkg priority="core">raster</pkg>
    <pkg>rasterVis</pkg>
    <pkg priority="core">RColorBrewer</pkg>
    <pkg>recmap</pkg>
    <pkg>regress</pkg>
    <pkg priority="core">rgdal</pkg>
    <pkg priority="core">rgeos</pkg>
    <pkg>RgoogleMaps</pkg>
    <pkg>rgrass7</pkg>
    <pkg>RNetCDF</pkg>
    <pkg>rpostgis</pkg>
    <pkg>RPyGeo</pkg>
    <pkg>RQGIS</pkg>
    <pkg>RSAGA</pkg>
    <pkg>RSurvey</pkg>
    <pkg>rtop</pkg>
    <pkg>rworldmap</pkg>
    <pkg>rworldxtra</pkg>
    <pkg>S2sls</pkg>
    <pkg>seg</pkg>
    <pkg>sgeostat</pkg>
    <pkg>shapefiles</pkg>
    <pkg>shp2graph</pkg>
    <pkg priority="core">sp</pkg>
    <pkg priority="core">spacetime</pkg>
    <pkg>siplab</pkg>
    <pkg>spacom</pkg>
    <pkg>spaMM</pkg>
    <pkg>spanel</pkg>
    <pkg>sparr</pkg>
    <pkg>spatial</pkg>
    <pkg>spatialCovariance</pkg>
    <pkg>SpatialEpi</pkg>
    <pkg>SpatialExtremes</pkg>
    <pkg>spatialkernel</pkg>
    <pkg>SpatialPosition</pkg>
    <pkg>spatcounts</pkg>
    <pkg>spatgraphs</pkg>
    <pkg>spatialprobit</pkg>
    <pkg>spatialsegregation</pkg>
    <pkg>spatial.tools</pkg>
    <pkg>SpatialTools</pkg>
    <pkg priority="core">spatstat</pkg>
    <pkg>spatsurv</pkg>
    <pkg>spBayes</pkg>
    <pkg>spBayesSurv</pkg>
    <pkg>spcosa</pkg>
    <pkg priority="core">spdep</pkg>
    <pkg>spgrass6</pkg>
    <pkg>spgwr</pkg>
    <pkg>sphet</pkg>
    <pkg priority="core">splancs</pkg>
    <pkg>splm</pkg>
    <pkg>spselect</pkg>
    <pkg>spsurvey</pkg>
    <pkg>spTimer</pkg>
    <pkg>SSN</pkg>
    <pkg>statebins</pkg>
    <pkg>Stem</pkg>
    <pkg>stplanr</pkg>
    <pkg>taRifx</pkg>
    <pkg>tgp</pkg>
    <pkg>trip</pkg>
    <pkg>tripEstimation</pkg>
    <pkg>tripack</pkg>
    <pkg>tmap</pkg>
    <pkg>UScensus2000cdp</pkg>
    <pkg>UScensus2000tract</pkg>
    <pkg>vardiag</pkg>
    <pkg>vec2dtransf</pkg>
    <pkg>vegan</pkg>
    <pkg>Watersheds</pkg>
    <pkg>wkb</pkg>
  </packagelist>

    
  <links>
    <view>Environmetrics</view>
    <a href="http://geodacenter.asu.edu/projects/rsp">Rgeo: Spatial Statistics with R</a>
    <a href="https://stat.ethz.ch/mailman/listinfo/R-SIG-Geo/">R-SIG-Geo mailing list</a>
  </links> 

</CRANTaskView>
