Skip to content

Commit

Permalink
Reduce the number of exported functions (#420)
Browse files Browse the repository at this point in the history
These functions were exported but aren't really used and add clutter

Towards #206  #399
  • Loading branch information
dfalster authored Jun 2, 2024
1 parent 7bdb299 commit b62c59e
Show file tree
Hide file tree
Showing 56 changed files with 177 additions and 1,003 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
^vignettes/package_organisation.Rmd$
^vignettes/parameters.Rmd$
^vignettes/patch.Rmd$
^vignettes/profiling_code.Rmd$
^vignettes/self_thinning.Rmd$
^vignettes/strategy_new.Rmd$
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Suggests:
here,
deSolve,
numDeriv,
parallel,
RcppR6 (>= 0.2.3),
knitr,
rmarkdown,
Expand All @@ -57,4 +56,4 @@ Remotes:
VignetteBuilder: knitr
URL: https://github.com/traitecoevo/plant
BugReports: https://github.com/traitecoevo/plant/issues
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
58 changes: 1 addition & 57 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,107 +1,58 @@
# Generated by roxygen2: do not edit by hand

S3method(resource_compensation_point,Plant)
S3method(validate,Parameters)
export("%>%")
export(Control)
export(Disturbance_Regime)
export(FF16_Environment)
export(FF16_Individual)
export(FF16_Node)
export(FF16_Parameters)
export(FF16_Patch)
export(FF16_SCM)
export(FF16_Species)
export(FF16_StochasticPatch)
export(FF16_StochasticPatchRunner)
export(FF16_StochasticSpecies)
export(FF16_Strategy)
export(FF16_expand_state)
export(FF16_fixed_environment)
export(FF16_generate_stand_report)
export(FF16_hyperpar)
export(FF16_make_environment)
export(FF16_test_environment)
export(FF16r_Individual)
export(FF16r_Node)
export(FF16r_Parameters)
export(FF16r_Patch)
export(FF16r_SCM)
export(FF16r_Species)
export(FF16r_StochasticPatch)
export(FF16r_StochasticPatchRunner)
export(FF16r_StochasticSpecies)
export(FF16r_Strategy)
export(FF16r_hyperpar)
export(FF16r_make_environment)
export(FF16r_test_environment)
export(FF16w_Individual)
export(FF16w_Node)
export(FF16w_Parameters)
export(FF16w_Patch)
export(FF16w_SCM)
export(FF16w_Species)
export(FF16w_StochasticPatch)
export(FF16w_StochasticPatchRunner)
export(FF16w_StochasticSpecies)
export(FF16w_Strategy)
export(FF16w_fixed_environment)
export(FF16w_hyperpar)
export(FF16w_make_environment)
export(FF16w_test_environment)
export(Individual)
export(Internals)
export(Interpolator)
export(K93_Environment)
export(K93_Individual)
export(K93_Node)
export(K93_Parameters)
export(K93_Patch)
export(K93_SCM)
export(K93_Species)
export(K93_StochasticPatch)
export(K93_StochasticPatchRunner)
export(K93_StochasticSpecies)
export(K93_Strategy)
export(K93_fixed_environment)
export(K93_hyperpar)
export(K93_make_environment)
export(K93_test_environment)
export(No_Disturbance)
export(NodeSchedule)
export(OdeControl)
export(TF24_Environment)
export(TF24_Individual)
export(TF24_Node)
export(TF24_Parameters)
export(TF24_Patch)
export(TF24_SCM)
export(TF24_Species)
export(TF24_StochasticPatch)
export(TF24_StochasticPatchRunner)
export(TF24_StochasticSpecies)
export(TF24_Strategy)
export(TF24_fixed_environment)
export(TF24_generate_stand_report)
export(TF24_hyperpar)
export(TF24_make_environment)
export(TF24_test_environment)
export(Weibull_Disturbance_Regime)
export(bounds)
export(bounds_infinite)
export(build_schedule)
export(cbind_list)
export(check_bounds)
export(check_point)
export(clamp_domain)
export(environment_type)
export(expand_parameters)
export(fast_control)
export(grow_individual_to_height)
export(grow_individual_to_size)
export(grow_individual_to_time)
export(hyperpar)
export(individual_list)
export(integrate_over_size_distribution)
export(interpolate_to_heights)
export(interpolate_to_times)
Expand All @@ -114,16 +65,13 @@ export(make_environment)
export(make_hyperpar)
export(make_patch)
export(make_scm_integrate)
export(make_transparent)
export(mutant_parameters)
export(nlsolve)
export(node_schedule_times_default)
export(optimise_individual_rate_at_height_by_trait)
export(optimise_individual_rate_at_size_by_trait)
export(param_hyperpar)
export(plant_log_console)
export(plot_size_distribution)
export(rbind_list)
export(resource_compensation_point)
export(run_plant_benchmarks)
export(run_scm)
Expand All @@ -136,15 +84,11 @@ export(scm_state)
export(seq_log)
export(seq_log_range)
export(seq_range)
export(splinefun_log)
export(splinefun_loglog)
export(strategy)
export(strategy_default)
export(strategy_list)
export(tidy_individual)
export(tidy_patch)
export(trait_matrix)
export(validate)
export(util_colour_set_opacity)
importFrom(R6,R6Class)
importFrom(Rcpp,evalCpp)
importFrom(grDevices,col2rgb)
Expand Down
4 changes: 1 addition & 3 deletions R/RcppR6.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Generated by RcppR6: do not edit by hand
## Version: 0.2.4
## Hash: 86d2dab10f9081823f16a63c8035a2ae
## Hash: 1e61b714fa073aff744206eaac010b91

##' @importFrom Rcpp evalCpp
##' @importFrom R6 R6Class
Expand Down Expand Up @@ -700,7 +700,6 @@ OdeRunner <- function(T) {
##' @title ODE Control parameters
##' @param ...,values Values to initialise the struct with (either as
##' variadic arguments, or as a list, but not both).
##' @export
`OdeControl` <- function(..., values=list(...)) {
ret <- OdeControl__ctor()
if (length(values) > 0L) {
Expand Down Expand Up @@ -1620,7 +1619,6 @@ IndividualRunner <- function(T, E) {
##' @title Extract Internals from plant object
##' @param s_size ???
##' @param a_size ???
##' @export
`Internals` <- function(s_size, a_size) {
Internals__ctor(s_size, a_size)
}
Expand Down
143 changes: 0 additions & 143 deletions R/bounds.R

This file was deleted.

46 changes: 1 addition & 45 deletions R/ff16.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,12 @@ FF16_Individual <- function(s=FF16_Strategy()) {
Individual("FF16", "FF16_Env")(s)
}

##' @export
##' @rdname FF16
FF16_Node <- function(s=FF16_Strategy()) {
Node("FF16", "FF16_Env")(s)
}

##' @export
##' @rdname FF16
FF16_Species <- function(s=FF16_Strategy()) {
Species("FF16", "FF16_Env")(s)
}

##' @export
##' @rdname FF16
FF16_Parameters <- function() {
Parameters("FF16","FF16_Env")()
}

##' @export
##' @rdname FF16
##' @param p A \code{Parameters<FF16,FF16_Env>} object
FF16_Patch <- function(p) {
Patch("FF16", "FF16_Env")(p)
}

##' @export
##' @rdname FF16
FF16_SCM <- function(p) {
SCM("FF16", "FF16_Env")(p)
}

##' @export
##' @rdname FF16
FF16_StochasticSpecies <- function(s=FF16_Strategy()) {
StochasticSpecies("FF16", "FF16_Env")(s)
}

##' @export
##' @rdname FF16
FF16_StochasticPatch <- function(p) {
StochasticPatch("FF16", "FF16_Env")(p)
}

##' @export
##' @rdname FF16
FF16_StochasticPatchRunner <- function(p) {
StochasticPatchRunner("FF16", "FF16_Env")(p)
}


## Helper to create FF16_environment object. Useful for running individuals
##' @title create FF16_environment object
Expand Down Expand Up @@ -108,10 +65,9 @@ FF16_fixed_environment <- function(e=1.0, height_max = 150.0) {
##' @param n number of points
##' @param light_env function for light environment in test object
##' @param n_strategies number of strategies for test environment
##' @export
##' @rdname FF16_test_environment
##' @examples
##' environment <- FF16_test_environment(10)
##' environment <- plant:::FF16_test_environment(10)
FF16_test_environment <- function(height, n=101, light_env=NULL,
n_strategies=1) {

Expand Down
Loading

0 comments on commit b62c59e

Please sign in to comment.