swath {gmGeostats} | R Documentation |
Swath plots
Description
Plots of data vs. one spatial coordinate, with local average spline curve
Usage
swath(data, ...)
## Default S3 method:
swath(
data,
loc,
pch = ".",
withLoess = TRUE,
commonScale = TRUE,
xlab = deparse(substitute(loc)),
...,
mfrow
)
## S3 method for class 'acomp'
swath(
data,
loc,
pch = ".",
withLoess = TRUE,
commonScale = NA,
xlab = deparse(substitute(loc)),
...
)
## S3 method for class 'ccomp'
swath(
data,
loc,
pch = ".",
withLoess = TRUE,
commonScale = NA,
xlab = deparse(substitute(loc)),
...
)
## S3 method for class 'rcomp'
swath(
data,
loc,
pch = ".",
withLoess = TRUE,
commonScale = NA,
xlab = deparse(substitute(loc)),
...
)
Arguments
data |
data to be represented, compositional class, data.frame, or
spatial data object (in which case, |
... |
further arguments to panel plots |
loc |
a numeric vector with the values for one coordinate |
pch |
symbol to be used for the individual points, defaults to "." |
withLoess |
either logical (should a loess line be added?) or a list of arguments to DescTools::lines.loess |
commonScale |
logical or NA: should all plots share the same vertical range? FALSE=no, TRUE=yes (default), for compositional data sets, the value NA (=all plots within a row) is also permitted and is actually the default |
xlab |
label for the common x axis (defaults to a deparsed version of loc) |
mfrow |
distribution of the several plots; it has a good internal default (not used for compositional classes) |
Value
Nothing, as the function is primarily called to produce a plot
Methods (by class)
-
default
: swath plot default method -
acomp
: Swath plots for acomp objects -
ccomp
: Swath plots for ccomp objects -
rcomp
: Swath plots for rcomp objects
Examples
data("Windarling")
library("sp")
compo = compositions::acomp(Windarling[,c("Fe","Al2O3","SiO2", "Mn", "P")])
Northing = Windarling$Northing
swath(compo, Northing)
wind.spdf = sp::SpatialPointsDataFrame(sp::SpatialPoints(Windarling[,6:7]),
data=compo)
swath(wind.spdf, loc=Northing)