Install the latest stable version of fgeo.analyze with:
- +these_repos <- c(getOption("repos"), "https://forestgeo.github.io/drat")
+install.packages("fgeo.analyze", repos = these_repos)
Install the development version of fgeo.analyze with:
diff --git a/inst/WORDLIST b/inst/WORDLIST index 812c551..041ec83 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -33,6 +33,7 @@ substract Tarak tbl tibble +tidyverse treeid tt TT diff --git a/man/abundance.Rd b/man/abundance.Rd index dc6c9a5..36b6eac 100644 --- a/man/abundance.Rd +++ b/man/abundance.Rd @@ -5,12 +5,12 @@ \alias{basal_area} \title{Abundance and basal area, optionally by groups.} \usage{ -abundance(x) +abundance(data) -basal_area(x) +basal_area(data) } \arguments{ -\item{x}{A dataframe. \code{\link[=basal_area]{basal_area()}} requires a column named \code{dbh} (case +\item{data}{A dataframe. \code{\link[=basal_area]{basal_area()}} requires a column named \code{dbh} (case insensitive).} } \description{ @@ -57,7 +57,6 @@ stem <- tribble( ) abundance(stem) - \dontrun{ # Similar but more realistic stem <- fgeo.x::download_data("luquillo_stem5_random") @@ -122,7 +121,6 @@ basal_area(main_stemids) # You can compute by groups basal_area(by_census) - \dontrun{ measurements_is_installed <- requireNamespace("measurements", quietly = TRUE) if (measurements_is_installed) { diff --git a/man/fgeo_habitat.Rd b/man/fgeo_habitat.Rd index 2f7b6ae..54774ed 100644 --- a/man/fgeo_habitat.Rd +++ b/man/fgeo_habitat.Rd @@ -4,16 +4,16 @@ \alias{fgeo_habitat} \title{Create habitat data from measures of topography.} \usage{ -fgeo_habitat(elevation, gridsize, n, ...) +fgeo_habitat(elev, gridsize, n, ...) } \arguments{ -\item{elevation}{One of these: +\item{elev}{One of these: \itemize{ -\item A dataframe containing elevation data, with columns \code{gx} and \code{gy} or \code{x} -and \code{y} (e.g. \code{fgeo.x::elevation$col}). -\item A ForestGEO-like elevation list with elements -\code{xdim} and \code{ydim} giving plot dimensions, and element \code{col} containing a -dataframe as described in the previous item (e.g. \code{fgeo.x::elevation}). +\item A dataframe containing elevation data, with columns \code{gx}, \code{gy}, and +\code{elev}, or \code{x}, \code{y}, and \code{elev} (e.g. \code{fgeo.x::elevation$col}). +\item A ForestGEO-like elevation list with elements \code{xdim} and \code{ydim} giving +plot dimensions, and element \code{col} containing a dataframe as described in +the previous item (e.g. \code{fgeo.x::elevation}). }} \item{gridsize}{Number giving the size of each quadrat for which a habitat diff --git a/man/fgeo_topography.Rd b/man/fgeo_topography.Rd index 9658ab6..49e39f4 100644 --- a/man/fgeo_topography.Rd +++ b/man/fgeo_topography.Rd @@ -6,22 +6,21 @@ \alias{fgeo_topography.list} \title{Create topography data: convexity, slope, and mean elevation.} \usage{ -fgeo_topography(elevation, ...) +fgeo_topography(elev, ...) -\method{fgeo_topography}{data.frame}(elevation, gridsize, xdim = NULL, +\method{fgeo_topography}{data.frame}(elev, gridsize, xdim = NULL, ydim = NULL, edgecorrect = TRUE, ...) -\method{fgeo_topography}{list}(elevation, gridsize, edgecorrect = TRUE, - ...) +\method{fgeo_topography}{list}(elev, gridsize, edgecorrect = TRUE, ...) } \arguments{ -\item{elevation}{One of these: +\item{elev}{One of these: \itemize{ -\item A dataframe containing elevation data, with columns \code{gx} and \code{gy} or \code{x} -and \code{y} (e.g. \code{fgeo.x::elevation$col}). -\item A ForestGEO-like elevation list with elements -\code{xdim} and \code{ydim} giving plot dimensions, and element \code{col} containing a -dataframe as described in the previous item (e.g. \code{fgeo.x::elevation}). +\item A dataframe containing elevation data, with columns \code{gx}, \code{gy}, and +\code{elev}, or \code{x}, \code{y}, and \code{elev} (e.g. \code{fgeo.x::elevation$col}). +\item A ForestGEO-like elevation list with elements \code{xdim} and \code{ydim} giving +plot dimensions, and element \code{col} containing a dataframe as described in +the previous item (e.g. \code{fgeo.x::elevation}). }} \item{...}{Other arguments passed to methods.} @@ -29,7 +28,7 @@ dataframe as described in the previous item (e.g. \code{fgeo.x::elevation}). \item{gridsize}{Number giving the size of each quadrat for which a habitat is calculated. Commonly, \code{gridsize = 20}.} -\item{xdim, ydim}{(Required if \code{elevation} is a dataframe) \code{x} and \code{y} +\item{xdim, ydim}{(Required if \code{elev} is a dataframe) \code{x} and \code{y} dimensions of the plot.} \item{edgecorrect}{Correct convexity in edge quadrats?} diff --git a/man/tt_test.Rd b/man/tt_test.Rd index 747630d..d9cbe8e 100644 --- a/man/tt_test.Rd +++ b/man/tt_test.Rd @@ -4,10 +4,10 @@ \alias{tt_test} \title{Torus Translation Test to determine habitat associations of tree species.} \usage{ -tt_test(census, habitat, sp = NULL, plotdim = NULL, gridsize = NULL) +tt_test(tree, habitat, sp = NULL, plotdim = NULL, gridsize = NULL) } \arguments{ -\item{census}{A dataframe; a ForestGEO \emph{tree} table (see details).} +\item{tree}{A dataframe; a ForestGEO \emph{tree} table (see details).} \item{habitat}{Object giving the habitat designation for each plot partition defined by \code{gridsize}. See \code{\link[=fgeo_habitat]{fgeo_habitat()}}.} diff --git a/tests/testthat/test-tt_test.R b/tests/testthat/test-tt_test.R index 8d4164e..8304a97 100644 --- a/tests/testthat/test-tt_test.R +++ b/tests/testthat/test-tt_test.R @@ -70,8 +70,8 @@ test_that("species may be factor or character", { test_that("tt_test fails gracefully with bad input", { expect_error( - tt_test(census = 1, c("SLOBER", "PREMON"), habitat = hab_luq), - "data.frame.*census.*is not TRUE" + tt_test(1, c("SLOBER", "PREMON"), habitat = hab_luq), + "data.frame.*is not TRUE" ) expect_error(