Man pages for forestgeo/ctfs
Tools for the Analysis of Forest Dynamics

abundanceAbundance or basal area dividing data with 1 or 2 categorical...
abundanceperquadAbundance, basal area, or agb of every species by quadrat.
abundance.sppAbundance of trees by species and DBH classes.
abund.manycensusCollect abundances of all species across several censuses.
abundmodel.fitSimply return the modeled histogram for any set of...
addBinParamGiven parameters for a model with N linear bins, creates...
agb.dbhmodelCalculates biomass from density and diameter, without height.
AGB.dbtableThis function looks up the database named AGB in the MySQL...
AGB.indAbove ground biomass (agb) based on one of the Chave...
agb.modelCalculates biomass from density, height, and dbh.
AGB.treeAGB of each tree, grouping all stems of one tree and adding...
allquadratslopesCalculates the slope of all quadrats in a plot.
angleBisectorGiven 3 sets of coordinates defining two line segments...
AnnuliTotal area in a series of annuli, summed over all individuals...
are.ptsinsideCheck if points belong to quadrat.
args_ofTitle
arrangeParam.GibbsUsed in the loop of a Gibbs sampler, setting parameters not...
arrangeParam.Gibbs.2DUsed in the loop of a Gibbs sampler, setting parameters not...
arrangeParam.llikeUsed in likelihood function of a Gibbs sampler. Allows any of...
arrangeParam.llike.2DUsed in likelihood function of a Gibbs sampler for lmerBayes,...
assembleBinOutputUse the list output from piecewise regression (growthfit.bin)...
assemble.demographyReformat the output from demographic functions from list to...
AssignDiagA way to assign the diagonals of a matrix that can handle...
asymp.htAsymptote for y as a function of x.
asymp.ht.fixmaxSame formulation, but the asymptote is fixed, so only two...
asymptote.expA 3-parameter function which asymptotes as x->infinity.
attach_if_neededDeprecated. See section _Good practice_ in '?attach'. To use...
autoregressionAutocorrelation with a given lag of a vector y.
baBasal area of trees.
bad.asymexp.paramFor either the Gaussian, or asymexp, the SD parameters must...
bad.asympower.paramThe 3 parameters submitted to hyper.abundGibbs have to be...
bad.binparamThis prevents the bin parameters from moving outside the x...
bad.binsdparbad.binsdpar
BadParamThis is a default for model.xy, never returning TRUE. To use...
bad.paretoparTest whether parameters for the Pareto distribution are...
badSDbadSD arrangeParam.llike.2D Used in likelihood function of a...
basumReturns the basal area summed over all submitted dbhs.
beta.normalizedNormalzing beta.total. No longer used. beta.normalized...
betaproductThis is equivalent to the normal product above.betaproduct...
beta.totalA beta distribution on the interval xmin to xmax, instead of...
binGraphManySpeciesGraph AGB growth and model fit of many species overlaid.
binGraphManySpecies.PanelMake a graph, 4 panels, of AGB growth and model fit of many...
binGraphSampleSpeciesMake a single graph, 4 panels, of AGB growth and model fit.
biomass.changeFinds biomass in two censuses and change between them.
biomass.CTFSdbBiomass for trees and stems using dbh allometry.
biomass.growthCalculate change in biomass (agb).
bootconfA simple calculation of confidence limits based on the SD of...
bootstrap.corrRunning bootstrap on a correlation. Any columsn can be chosen...
border.distanceDistance from a point to the nearest boundary of a rectangle...
calcalphaCalculates alpha from a stem and species count submitted...
calc.directionslopeThis runs equations 1-3 of Seibert &...
calc.gradientCalculate flow using Seibert & McGlynn algorithm.
calcMortIndivTableCalculate mortality rate per species per census interval...
CalcRingAreaGiven a dataframe that includes gx, gy coordinates, and a...
calcS.alphaNumber of species in a sample of N individuals, given...
calcslopeGiven the z-coordinate of 3 points in 3D space whose x-y...
calculateBinModel.AICCalculate AIC of the model, using various log(likelihood)...
calculateBinModel.bestpredCalculate mean predicted value at every x using every one of...
calculateBinModel.BICCalculate Bayes Information Criteria using Wikipedia formula.
cartesian.to.polarConvert Cartesian coordinates to polar. Returns a dataframe...
center.predictorsTransform all data by subtracting a constant, either the...
charlocateFinds position of a substring needle inside a longer string...
Chave.AGBThe Chave 2005 Oecologia model for calculating biomass from...
CIConfidence limits (quantiles) from a vector at specified...
circleCalculates points on a circle.
circleareaArea of a circle of radius r.
clean.demographyKeep or clean rows outputed by mortality, growth, or...
coldata.to.imagematMap response variables using 'contour()', 'image()', and...
colMediansFor convenient medians, like colMeans.colMedians midPoint...
compare.growthbinmodelCalculates various metrics of fit: DIC, BIC, AIC.
complete.plotmapMap every individual.
constantA function to return a constant at all predictors x.
constant.binA model like piecewise regression (linearmodel.bin), but y is...
constant.linearA model which is constant for x<lim, and linear for x>lim....
convert.factorConverts from factors to character.
convert.rowcolConvert an integer to a character, with a single leading zero...
CountByGroupGroups a dataframe by one or more columns (named by...
countEmptyCounts vector elements that are NA or a string of no...
countNACounts vector elements that are NA.countNA countEmpty Counts...
countoneCounts vector elements exactly one.countone countNA Counts...
countpresentCounts vector elements > 0. See countspp as well.countpresent...
countsppReturns the number of elements in a numeric vector > 0....
countUniqueCount the number of unique elements in a vectorcountUnique...
countzeroCounts vector elements exactly zero.countzero countone Counts...
coverage.diagDraws a diagonal across a plot.
covTocorrConvert covariance matrix to correlation matrix. Each element...
create.fulldateConverts a vector of date character strings in any format to...
create.fulldate.splitConverts the MySQL date format by splitting on the hyphen (or...
create.neighbordataCalculates the mean density in neighboring quadrats for every...
ctfs-packagectfs: Tools for the Analysis of Forest Dynamics
CTFSplotDeprecated. Use <DATA> from Barro Colorado Island with...
cumul.aboveSeek x at which the curve passes through a given y.
dasymexpProbability distributions for a folded but asymmetrical...
dasymnormProbability distributions for an asymmetrical Gaussian.
dasympowerA bilateral power distribution, centered at center, decaying...
dbeta.reparamReparameterize beta distribution as a function of its mean...
DBHtransitionCalculates a transition matrix of individuals by diameter...
dbinomrevA version of dbinom in which parameters are submitted in a...
d.calcS.alphaThe derivative for use in Newtons methodd.
default.badparNone given.default.badpar bad.paretopar Test whether...
defineBinBreaksThis finds divisions of over the vector size which produce...
define.graphwindowDefine an export device for a graph, based on the argument...
defineSDparFor default SD parameters, if nothing else works. Choose the...
density_indCreate a vector of wood density for each individual tree...
detachfilesdetachs from the searchpath files matching a submitted vector...
dexp.sinFour-parameter exponential sin, as a probability...
dgammadexpPDF by adding a gamma distribution to a symmetrical...
dgamma.meanA version of dgamma where the parameters are ordered so that...
dgamma.meansdProbability distribution of gamma, parameterized with mean...
dgammaMinusdexpThe PDF of a gamma distribution minus a negative exponential...
dgammaPlusdexpThe PDF of the sum of gamma and negative exponential...
dgamma.scaleLike above, but with scale as the first...
discrete.modelA model for a numeric response to a single discrete...
discrete.mortmodelA model for mortality as a function of a single discrete...
distanceDistance from one quadrat to a second quadrat.
distance.to.sideCalled from imageJ.to.lxly where for each point, distance to...
ditchDetaches all files at one or more search positions; v can be...
dmixnormMixed normal distribution.
dnormprod0Probability density of product of two normal variates, both...
dnormrevReverse the order of parameters to dnorm.
doublenormalSimulate draws from a double normaldoublenormal.
dpois.maxA probability distribution which is simply a curtailed...
dpois.maxtruncA zero-truncated Poisson distribution with a ceiling...
dpois.rearrangeThis rearranges dpois so that it works on a single vector,...
dpois.truncA zero-truncated Poisson distribution. dpois.trunc...
dpowerA probability distribution defined by a power function. There...
draw.axesAdd axes to a graph, with ticks spaced by the vector div.
drawrectangleDraw a rectangle given a matrix or dataframe of 4 x-y...
drpA version of drop which includes as.matrix. Without it, drop...
dsymexpProbability distribution for a folded, symmetrical...
dweibull.3paramPDF of three-parameter Weibulldweibull.3param...
elev.to.listConvert a dataframe of coordinates and elevation into a list.
ellipseEquation for (half) a canonical ellipse fullellipse Creates a...
enoughSamplePerBinTest whether the number of elements in a vector x between...
exclude.unidentifiedA more specialized version of unidentified species. It...
exp_2parAn exponential distribution with an asymptote. @details Name...
explodeSplit a single (atomic) character variable into sections,...
exponential.sinFive-parameter exponential sinexponential.sin pexp.sin CDF of...
expon.modelExponential model, y = a exp(b1_x1 + b2_x2) for any number of...
extract.growthdataExtract growth rates from plot databases and 2 censuses.
fill.1dimensionFilling a 1D array resulting from tapply. Same as...
fill.dimensionThis function fills out an array of 2 dimensions, adding...
findborderquadsGiven a quadrat index, calculate indices of neighboring...
find.climitsCalculate confidence limits around a number of deaths.
findneighborabundFor every quadrat, finds neighboring quadrats and returns...
find.nonNAReturns the first value of a vector x which is not...
find.xaxis.histGiven an abundance fit and x axis range and divisions, return...
fit.beta.normalFinding a normal distribution which most closely fits a given...
fit.logisticA function to fit a set of data y, observed at the vector x,...
fitnormFitting a normal distribution to data Parameters are a mean...
fit.pdfFit a random variable x to any submitted probability...
fitSeveralAbundModelRun model.littleR.Gibbs for a series of census databases.
fromjulianConvert calendar dates from julian dates.
full.abundmodel.llikeWith the table of abundances, hyper-parameter estimates, and...
fullcircleCreate a dataframe for a full circle.
fullellipseCreates a dataframe for a full ellipse.
full.likelihood.lmerBayesLikelihood for any complete set of parameters.
fullplot.imageJConvert pixels to coordinates within a quadrat.
full.xygridCreate a complete of points x-y, given the sequence of unique...
get.filenameThis sets a name for outputting a map (or any graph) to a...
getquadratnameConvert x, y coordinates and plot dimensions into 4-character...
getsmallerquadsConvert indices from larger to smaller quadrats.
getTopoLinksThis is solely for use by solve_topo. It finds all points...
Gibbs.normalmeanThe standard Gibbs sampler for a normal distribution with...
Gibbs.normalvarGibbs draw for the variance of a normal distribution...
Gibbs.regsigmaUpdates the regression standard deviation (used in...
Gibbs.regslopeUpdates the regression slope (used in...
graph.abundmodelOutput histograms of little.r across species, observed and...
graphFilledBandFill the area between two curves on a graph.
graph.growthmodelGraph growth rates and model fit.
graph.growthmodel.sppUse output of growth.flexbin to graph observed growth and...
graph.modeldiagGraph diagnostics of model.xy.
graph.mvnormPlot contours for an mvnorm, with parameters submitted as a...
graph.outliersPlot outliers overlaid on the model and full data for all...
graph.outliers.sppPass the output of extract.growth with every individual's...
graph.quadratsPlot a series of quadrats with corners xlo, ylo, xhi, yhi.
growthAnnual Growth Rates by Categories.
growth.biomass.indivLike growth.indiv but based on agb growth, not dbh growth.
growth.dbhCalculates forest-wide growth in given dbh categories.
growth.eachsppCalculate growth for each species in given dbh categories.
growth.flexbinFit a regression line through log growth against log dbh,...
growth.indivTable growth rate of every individual both relative and...
gspReturns one of the objects at a given search position. This...
gxgy.to.hectindexConverts GX GY Coordinates to a Hectare Number.
gxgy.to.indexAssign any location(s) a single index identifying the...
gxgy.to.lxlyCalculate local x and y coordinates from global coordinates.
gxgy.to.quadCalculate a quadrat name from gy-gy.
gxgy.to.rowcolReturns row and column for any set of coordinates.
harmonic.meanHarmonic mean of a vector x.
hist_compareCompares two histograms with a Kolmogorov approach. @details...
hyper.abundGibbsLikelihood function for hyperparameters of abundance model,...
hyper.mortGibbsLikelihood function for logMu and logSD, given the species...
IfElseA Version of 'base::ifelse()'.
image_dataframeCreates a color response map based on columnar data.
imageGraphMaps a response variable with Rs contour or image functions,...
imageJ.to.lxlyConvert map pixels from digitzing program to plot...
index.to.gxgyCalculate the x and y coordinates given the quadrat index.
index.to.rowcolCalculate the row and column given the quadrat index.
individual_grow.tableCreate a table of individual trees and their growth over two...
individual_mort.tableTable individual trees and their survival status over two...
inside.rectDetermines whether any of the 4 corners of one rectangle are...
insideRectangleChecks a vector of coordinates x, y to return which are...
intersection.line.curveFinds the points where a straight line, given lines as...
intersection.of.linesFinds the point where 2 lines intersect, given lines as 2...
invlogitInverse logit transformation, turns a logit back into a...
is.betweenCheck whether a point x,y falls between two other points. The...
is.leapDeprecated. Is a year a leap year?
is_na_rowDetect rows in a data frame full of NA (accross columns).
is.oddA trivial function to test whether numbers (scalar or vector)...
ispt.insideCheck a single pt (x and y) against a large number of...
kurtosisSample kurtosis. The biased portion is the population...
leftLeftmost n characters of a string.
leftbutReturns the leftmost characters of a string, excluding the...
linear.modelA simple linear model, where the first parameter is...
linearmodel.binMultiple bin model predicting y as a function of x in several...
linearmodel.bin.setThis does the work of calculating predicted values at each...
linear.model.ctrA simple linear model, where the first parameter is...
linear.mortmodelA model for mortality as a function of one or more...
line.intersection.ptsFinds the point where 2 lines intersect, given each line as 2...
llike.GaussModelThis is for model.xy. Generate a likelihood for 'model.xy()'.
llike.GaussModelSDThis is for model.xy. Take the function for the SD, its...
llike.linearbin.optimThis is for optim, a single function taking all parameters at...
llike.model.lmerA llikelihood function for one set of parameters, for a...
lmerBayesA Metropolis MCMC version of lmer.
lmerBayes.hyperllike.meanThis is the hyper-likelihood for updating the hypermeans,...
lmerBayes.hyperllike.sigmaThis is the hyper-likelihood for updating the covariances. It...
lmerMortFixedTimeA model for mortality as a function of a single predictor...
lmerMortLinearA linear model of an annual mortality parameter, which is...
load.speciesA function for extracting a single speciesdataframe from the...
logical.grepA form of grep returning logical instead of indices...
logistic.ctrLogistic function with intercept parameterization centering...
logistic.interLogistic function with intercept parameterization (i.e.,...
logisticmodel.binMultiple bin model predicting y as a function of x, where...
logistic.multiplicativeLogistic with a pair of parameters for each x; y=product of...
logistic.powerThis is the Gaussian logistic function, where logit is a...
logistic.power.modeThis is the Gaussian logistic function, where logit is a...
logistic.power_simpleThis is a mixture of logistic and logistic-standard models....
logistic.standardThis is standard logistic function, but with asymptote and...
logistic.sum.squaresSets a prediction based on a generalized logistic, then...
logitLogit transformation for a probability >0 and < 1logit...
log_modelLogarithmic model, y = a + b1 log(x1) + b2 log(x2) for any...
lxly.to.p5Calculate p5x5 from local or within-quadrat coordinates for a...
majoraxisregA major axis regression with parameters fitted by optim.
majoraxisreg.no.intMajor axis regression with no intercept. Only a slope is...
make.CredIntervalVectTake a vector y having mean then lower and upper credible...
mapDraw map of one or more species from one plot.
map1speciesMap a single species.
map2speciesMap 2 species to a 2-panel pdf.
maptopoDraws contours on a plot map.
match.dataframeMatches two dataframes using two or more columns. Rs function...
merge_dataCombine many dataframes as elements of a list into a single...
mergeParamMerges a list of parameter matrices into one large matrix....
metrop1stepTakes a single metropolis step on a single parameter for any...
metrop1step.discreteA version for metrop1step where the alternative values are...
midPointMidpoint of any vector.midPoint Source code and original...
minum.beta.normalFunction to be minimized for fitting normal to...
minum.mixnormFit a mixture of 2 normals.
minum.normalThe likelihood function for use by fitnorm.minum.normal...
minum.perpdistThe sum of squares used by majoraxisreg.minum.perpdist...
modelBayesA Metropolis MCMC version for any modeling y~x, without...
model.littleR.GibbsThe main function for fitting the probability distribution of...
model.xyBayesian routine for fitting a model to y given x.
MONTHNAMESObject assumed to be crucial. In 'utilities.R, the original...
mortalityMortality, forest-wide or based on one or two categories.
mortality.calculationCalculate mortality rate and confidence limits.
mortality.dbhCalculate forest-wide mortality in given dbh categories.
mortality.eachsppCalculate mortality for each species in given dbh categories.
mvrnormRCFrom a variance-covariance matrix, output normal variates...
NDcountCount of neighbors within radius r with edge effect...
NeighborDensitiesTotal number or basal area of conspecific and heterospecific...
neighborsFind proportion of neighboring quadrats in which a species is...
nhdA version of head with only 6 columns shown.nhd TextToRdata...
normalproductProduct of 2 normal distributions, the first at x and the...
order.bynumberReturns ordering of a character vector with any numbers...
order.by.rowcolReorder rows and columns of a matrix so they are sorted as if...
overlay.growthbinmodelShow model fits for 1, 2, 3, and 4 bins on each species.
parallel.lineSlope and intercept of a line parallel to another known line.
partialcircleareaArea of a circle of radius r that is inside a rectangular...
paste_pathPaste the path with the content of a directory.
pdf.allplotExport a pdf with one or more species maps.
perpendicular.distanceDistance from a point to a line (so its the perpendicular...
perpendicular.lineSlope and intercept of the line perpendicular to another...
pexp.sinCDF of four-parameter exponential sinpexp.sin mvrnormRC...
plot_waveletFunction to plot the wavelet variance from the output of the...
png.allplotExport species maps as png.
polar.to.cartesianConvert polar coordinates to Cartesian.
pop.changeChange in abundance, basal area, or agb in two censuses.
pop.change.dbhChange between two censuses in abundance or basal area.
pospowerRaise to any power, but with negative numbers converted to...
predht.asymAn allometric model predicting an asymptote at large size.
print_allPrint all rows of a tibble or tbl_df.
prob.N1Probability of observing N2 given N1 (little.r distributed...
pstA version of paste with sep.
psymexpThe CDF for the symmetric exponential.psymexp rsymexp Drawing...
pts.to.interceptslopeReturns intercept and slope of a line given two pairs of...
pweibull.3paramCDF of three-parameter...
qasymexpQuantiles of dasymexp y is the vector of desired quantiles; c...
qasympowerQuantiles from the bilateral power distribution, dasympower....
quadslopeGiven the elevation at four corners of a square of...
quad.to.gxgyConvert quadrat names into x-y coordinates.
randomElementReturn a random element from a vector randomElement...
randomRowReturn a random row from a dataframe.
rarefy.diversitySpecies number in a random subsample of 's' individuals.
rasterizeCalculate count, basal area or agb per quadrat.
rasympowerRandom draws from the bilateral power distribution,...
read_csv_altRead a csv file from two alternative paths.
readelevdataRead a table of elevation data into a matrix appropriate for...
rearrangeSurveyDataTakes a table of survey sightings with columns of x and y...
recalculate.lmerBayesllikeWalk through entire chain of parameters to calculate full...
recruitmentCalculate recruitment rates.
recruitment.eachsppA wrapper to calculate recruitment for each species.
regression.BayesRegression using the Gibbs sampler, with just one x variable.
regress.loglogPerforms regression and graphs in a convenient way.
regress.plotRegression coefficients, probabilities and graph.
regslopeReturns slope of regression as single scalar (for use with...
regslope.nointReturns slope of regression with no intercept as single...
regsumFor a polynomial regression, find x or y at y's peak or...
resetParamThis starts a new 3D parameter array whose first element is...
residual.llike.lmerBayesCalculate likelihood of residual standard deviation, given...
residual.llike.modelBayesCalculate likelihood of residual standard deviation.
restoreParamFileReverses the steps of saveParamFile, back to a 3D array. This...
rgamma.meansdRandom draws of gamma, parameterized with mean and sd.
rightReturns the rightmost n characters of a stringright rightbut...
rightbutReturns the rightmost characters of a string, excluding the...
RipUvKRipleys K using splancs.
rmixnormRandom draw on the mixed normal distribution.rmixnorm...
rm_na_rowRemove rows from data frame or matrix full of NA.
rndown5Rounds a numeric value to the next lowest multiple of...
rowcol.to.indexTakes row and column numbers and identifies the quadrate...
rpois.maxRandom draws on dpois.maxrpois.max rpois.trunc Random draws...
rpois.truncRandom draws on dpois.trunc.
rpowerRandom draws based on the integral.rpower dasympower A...
rsymexpDrawing a random variate on the symmetric exponential.
run.growthbin.manysppRun the model to fit growth rate in bins for many species,...
run.growthfit.binFind best fits for linearmodel.bin, with one set of data and...
saveParamFileThis saves a run of the full parameters into a text file,...
save.searchpathSave functions in position n to a file already attached.
SectionCorrectionCorrect coordinates, making them from 0 to 20.
segmentPtDraw a line segment between two points.
se.kurtosisStandard error of kurtosis. Depends only on sample size....
selectrandomquadDraws rectangular quadrats in a plot at random.
se.skewnessStandard error of skewness. se.skewness kurtosis Sample...
setsizeAn internal function, called by 'map()' to choose size of...
simpleAn even more trivial model to return x unchanged. The...
simple.modelA trivial model to return a different value at every x. If...
skewnessSample skewness. The biased portion is the population...
solve_topoThis is based on the problem and solution outlined in my book...
some_but_not_all_is_naPredicate to determine if some but not all elements of a...
split_dataSplit a dataframe into a list by any vector.
spmean.mort.abundGibbsLikelihood function for a species mean (a scalar, one species...
spparea.sqNumber of species in replicated, randomly-placed quadrats of...
standardreg.no.intStandard regression with no intercept.standardreg.no.int...
startCTFSFunction to source all components of CTFS R package. Load all...
StringToVectConverts a character string into a vector of individual...
strip_pathStip the bare file name when its sorrounded by references of...
strip_rdRemove ending .Rd or .rd.
summaryMCMCSummarize calculations based on the full Gibbs sampler.
sumsqA trivial function used in minimizing sums of squares.sumsq...
testmcmcfuncDeprecated. Test mcmc1step.
TextToRdataReads a tab-delimited text file and save as rdata.
tojulianConvert calendar dates to Julian dates.
torus.shiftCreates a torus-shifted quadrat topographic dataset.
trimTrims leading and trailing blanks from a vector of character...
trim.growthExclude growth rates
unidentified.speciesTakes a string of species names or codes and returns a...
vectToCommasGiven a vector of character variables, collapse into a single...
wavelet.allspWavelet variance curves for all species in one plot.
wavelet.bivariateBivariate wavelet variance using furier transforms.
wavelet.univariateUnivariate wavelet variance using furier transforms.
weibull.mean.3paramMean of three-parameter Weibullweibull.mean.3param...
weibull.median.3paramMedian of three-parameter Weibullweibull.median.3param...
weibull.sd.3paramSD of three-parameter Weibullweibull.sd.3param dexp.sin...
which.allnonNAFinds all values of a vector which are not NA. Fills out a...
which.maxNAsAn unfortunate bug in which.max: if all elements are NA, it...
which.nonNAReturns the first index at which a vector x is not...
which.vmatchFinds which subsequent element of a vector matches the first...
wideEnoughBinsTest whether all the bin widths exceed a minimum. MINBIN=0.1...
wsgdata_dummyCreate a dummy wsgdata data set
xydistDistance between two pairs of x-y coordinates. Input can be...
xydistmatDistance between two x-y coordinates.
xydistvectDistance between two x-y coordinates, but accepts each set of...
forestgeo/ctfs documentation built on May 3, 2019, 6:44 p.m.