Skip to content

Commit

Permalink
Fix to properly import stats and permute packages.
Browse files Browse the repository at this point in the history
These have been added in ROxygen importFrom statements, and the NAMESPACE was rebuilt.  Closes issue #69.
  • Loading branch information
mbjones committed Apr 26, 2016
1 parent a41ac9d commit d90bc6b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ export(rate_change_interval)
export(synchrony)
export(turnover)
export(variance_ratio)
importFrom(permute,shuffleSeries)
importFrom(stats,aggregate)
importFrom(stats,as.formula)
importFrom(stats,coef)
importFrom(stats,confint)
importFrom(stats,sd)
importFrom(stats,var)
1 change: 1 addition & 0 deletions R/community_stability.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#' time.var = "year",
#' abundance.var = "abundance",
#' replicate.var = "subplot") # across all subplots
#' @importFrom stats aggregate as.formula sd
#' @export

community_stability <- function(df, time.var,
Expand Down
1 change: 1 addition & 0 deletions R/rate_change.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#' species.var = "species",
#' abundance.var = "abundance",
#' replicate.var = "subplot") # across all subplots
#' @importFrom stats coef
#' @export
rate_change <- function(df, time.var,
species.var,
Expand Down
1 change: 1 addition & 0 deletions R/synchrony.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#' replicate.var = "subplot",
#' metric="Gross") # With Gross et al. (2014) metric.
#' }
#' @importFrom stats aggregate as.formula sd
#' @export
synchrony <- function(df, time.var,
species.var,
Expand Down
2 changes: 2 additions & 0 deletions R/temporal_torus_translation.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' Hallett, Lauren M., Joanna S. Hsu, Elsa E. Cleland, Scott L. Collins, Timothy L. Dickson, Emily C. Farrer, Laureano A. Gherardi, et al. "Biotic Mechanisms of Community Stability Shift along a Precipitation Gradient." Ecology 95, no. 6 (2014): 1693-1700.
#'
#' Harms, Kyle E., Richard Condit, Stephen P. Hubbell, and Robin B. Foster. "Habitat Associations of Trees and Shrubs in a 50-Ha Neotropical Forest Plot." Journal of Ecology 89, no. 6 (2001): 947-59.
#' @importFrom stats confint
#' @export
cyclic_shift <- function(df, time.var,
species.var,
Expand Down Expand Up @@ -148,6 +149,7 @@ confint.cyclic_shift <- function(object,
#'
#' @param comdat A community dataframe
#' @return rand.comdat A randomized community dataframe
#' @importFrom permute shuffleSeries
shuffle_community <- function(comdat){

# create empty matrix with same number of rows, columns as comdat
Expand Down
1 change: 1 addition & 0 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ check_multispp <- function(df, species.var, replicate.var){

#' Utility function to stop calculations if the species never change in a replicate
#' @param comdat A community dataframe
#' @importFrom stats var
check_sppvar <- function(comdat){
sppvar <- sum(apply(comdat, 2, var))
if(sppvar == 0)
Expand Down
1 change: 1 addition & 0 deletions R/variance_ratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#'
#' Schluter, Dolph. (1984) "A Variance Test for Detecting Species Associations,
#' with Some Example Applications." Ecology 65, no. 3: 998-1005. doi:10.2307/1938071.
#' @importFrom stats aggregate confint
#' @export
#' @examples
#' data(knz_001d)
Expand Down

0 comments on commit d90bc6b

Please sign in to comment.