Files
ROBITools/man/map.extrapol.freq.Rd

62 lines
2.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distrib.extrapol.R
\name{map.extrapol.freq}
\alias{map.extrapol.freq}
\title{Maps of krigged log10-transformed frequencies}
\usage{
map.extrapol.freq(x, path = NULL, col.name = NULL, index, cutoff = 0.001,
add.points = NULL, adj = 4)
}
\arguments{
\item{x}{an extrapol.freq output}
\item{path}{the path of the folder to export the map. Default is \code{NULL} and map is printed in Rplot/quartz}
\item{index}{an integer indicating column number of the motu/sequence to be plotted.}
\item{cutoff}{lower motu frequency accepted to consider motu abundance as different
from 0. Should be the same than the one used in extrapol.freq}
\item{add.points}{a 3-column data.frame containing factor levels and associated x and y coordinates
to be added to the map. Typically taxa observed in the field.}
\item{adj}{a value used for adjusting text position in the map. Default is \code{4}}
\item{col.names}{a vector containing the names of the columns to be used for defining the file name. Typically
the column names containing the taxonomic information and/or sequence/motus id.}
}
\value{
a map/png file displaying motus distribution.
}
\description{
Maps the output of extrapol.freq
}
\examples{
data(termes)
attr(termes, "samples")[c("x", "y")] = expand.grid(1:7,1:3)
#compute frequencies
attr(termes, "layers")[["reads.freq"]] = normalize(termes, MARGIN=1)$reads
# Getting extrapolations
termes.pred = extrapol.freq(attr(termes, "layers")[["reads.freq"]],
grid.grain=100,termes$samples[,c("x", "y")], termes$motus, cutoff=1e-3)
#mapping the distribution of the 3 most abundant sequences (caution, mfrow does not work for lattice's levelplot)
map.extrapol.freq(termes.pred, path=NULL, col.name=NULL, 1, cutoff=1e-3)
map.extrapol.freq(termes.pred, path=NULL, col.name=NULL, 2, cutoff=1e-3)
map.extrapol.freq(termes.pred, path=NULL, col.name=NULL, 3, cutoff=1e-3)
#dummy observationnal data
termes.obs = data.frame(x=c(2,3,5), y=c(2.7,2,2.6), taxa = rep("Isoptera Apicotermitinae", 3))
map.extrapol.freq(termes.pred, path=NULL, col.name=NULL, 3, cutoff=1e-3, add.points=termes.obs)
}
\seealso{
\code{\link{extrapol.freq}}, and \code{levelplot} from \code{lattice} package
}
\author{
Lucie Zinger
}