Skip to content

Commit

Permalink
Removing unused functions; downstream updates to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ashander committed Jan 9, 2015
1 parent 71e554a commit a5cdfd0
Show file tree
Hide file tree
Showing 27 changed files with 77 additions and 546 deletions.
7 changes: 1 addition & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Generated by roxygen2 (4.0.1): do not edit by hand
# Generated by roxygen2 (4.0.2): do not edit by hand

export(Beta)
export(Env_shift)
export(Env_shift_cpp)
export(Env_smooth)
export(G)
export(Log_R_bar)
export(Log_R_bar_dd)
export(Log_W_bar)
export(Log_W_bar_lethal)
export(Pheno_demo)
Expand All @@ -17,10 +16,6 @@ export(R_bar)
export(R_bar_dd)
export(Va)
export(W_bar)
export(pdLande)
export(pdLandeLRG)
export(pdLandeT)
export(pdRespVarLoad)
export(pdTS)
export(stab_curve)
import(MASS)
Expand Down
80 changes: 2 additions & 78 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ R_bar_dd <- function(R0, Wbar, N, K, thetaL) {
.Call('phenoecosim_R_bar_dd', PACKAGE = 'phenoecosim', R0, Wbar, N, K, thetaL)
}

#' Compute LOG population growth rate under stabilizing selection
#' @inheritParams R_bar_dd
#' @param logWbar log average fitness
#' @details Assumes theta-logistic population regulation
#' would be good to have separate DD function specified after
#' chevin and lande 2010
#' @export
Log_R_bar_dd <- function(R0, logWbar, N, K, thetaL) {
.Call('phenoecosim_Log_R_bar_dd', PACKAGE = 'phenoecosim', R0, logWbar, N, K, thetaL)
}

#' Selection on plasticity as as function of environment assuming stabilizing selection
#' @param gamma = 1/(Oz2 + Vz2), with Vz2 phenotypic variance
#' @param A the environmental optimum RN int
Expand Down Expand Up @@ -99,78 +88,13 @@ Env_shift_cpp <- function(t, env_args) {
.Call('phenoecosim_Env_shift_cpp', PACKAGE = 'phenoecosim', t, env_args)
}

#' Compute change in fitness over one generation after stabilizing selection
#' function of environment (after Lande Chevin)
#' @param t timestep
#' @param X parameters (a, b, env, logN)
#' @param params a list with (Oz2, AB, R0, K, theta)
#' @param G the (constant) G matrix
#' @param env_args extra args for env.fn
#' @details function signature as for use with deSolve
#' imposes fitness based on Lande
#' and demography after CL 2010
#' @return rowvector: log R bar, delta R bar, variance load
#' @export
pdRespVarLoad <- function(t, X, params, G, env_args) {
.Call('phenoecosim_pdRespVarLoad', PACKAGE = 'phenoecosim', t, X, params, G, env_args)
}

#' Compute trait + demographic change over one generation under stabilizing selection as
#' function of environment (after Lande Chevin)
#' @param t timestep
#' @param X parameters (a, b, env, logN)
#' @param params a list with (Oz2, AB, R0, K, theta)
#' @param G the (constant) G matrix
#' @param env_args extra args for env.fn
#' @details function signature as for use with deSolve
#' imposes fitness based on Lande
#' and demography after CL 2010
#' @export
pdLande <- function(t, X, params, G, env_args) {
.Call('phenoecosim_pdLande', PACKAGE = 'phenoecosim', t, X, params, G, env_args)
}

#' Compute trait + demographic change over T generations under stabilizing selection as
#' function of environment (after Lande Chevin)
#' @param T end time, assuming start time of 1
#' @param X parameters (a, b, env, logN)
#' @param params a list with (Oz2, AB, R0, K, theta)
#' @param G the (constant) G matrix
#' @param env_args extra args for env.fn
#' @details function signature as for use with deSolve
#' imposes fitness based on Lande
#' and demography after CL 2010
#' @export
pdLandeT <- function(T, X, params, G, env_args) {
.Call('phenoecosim_pdLandeT', PACKAGE = 'phenoecosim', T, X, params, G, env_args)
}

#' Compute trait + demographic change over over T generations and
#' long run growth rate over last N_lam generations
#' under stabilizing selection as
#' function of environment (after Lande Chevin)
#' @param T end time, assuming start time of 1
#' @param N_lam number of gens over which to compute long-run growth -- must be less than T
#' @param X parameters (a, b, env, logN)
#' @param params a list with (Oz2, AB, R0, K, theta)
#' @param G the (constant) G matrix
#' @param env_args extra args for env.fn
#' @details function signature as for use with deSolve
#' imposes fitness based on Lande
#' and demography after CL 2010
#' @export
pdLandeLRG <- function(T, N_lam, X, params, G, env_args) {
.Call('phenoecosim_pdLandeLRG', PACKAGE = 'phenoecosim', T, N_lam, X, params, G, env_args)
}

#' Compute phenotypic dynamic Time Series of trait + demographic change under stabilizing selection as
#' function of environment (after Lande Chevin)
#' @param T end time, assuming start time of 1
#' @param X parameters (z, a, b, wbar, logN, theta)
#' @param params a list with (Oz2, AB, R0, K, theta)
#' @param params a list with (gamma_sh, omegaz, A, B, R0, Va, Vb, delta, sigma_xi, rho_tau, fractgen)
#' @param env_args extra args for env.fn
#' @details NB - for now assume Tchange = 0
#' and demography after CL 2010
#' @details NB - for now assume Tchange = 0 and demography after CL 2010
#' @export
pdTS <- function(T, X, params, env_args) {
.Call('phenoecosim_pdTS', PACKAGE = 'phenoecosim', T, X, params, env_args)
Expand Down
2 changes: 1 addition & 1 deletion R/traitfitpop.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Pheno_lande <- function(t, X, p, G, env.fn, env.args) {
X <- c(a, b) + G %*% beta
va <- Va(e.plast, G)
list(c(X, env, z.bar, va))

}

#' Compute trait + demographic change under stabilizing selection as function of environment
#' @param t timestep
#' @param X parameters (a, b, env, N)
Expand Down
2 changes: 1 addition & 1 deletion man/Beta.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Beta}
\alias{Beta}
\title{Selection on plasticity as as function of environment assuming stabilizing selection}
Expand Down
2 changes: 1 addition & 1 deletion man/Env_shift.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Env_shift}
\alias{Env_shift}
\title{Compute a white noise environment with a shift}
Expand Down
2 changes: 1 addition & 1 deletion man/Env_shift_cpp.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Env_shift_cpp}
\alias{Env_shift_cpp}
\title{Compute a white noise environment with a shift}
Expand Down
2 changes: 1 addition & 1 deletion man/Env_smooth.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Env_smooth}
\alias{Env_smooth}
\title{Simulate one step of a linearly changing environment, possibly with noise}
Expand Down
2 changes: 1 addition & 1 deletion man/G.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{G}
\alias{G}
\title{G matrix}
Expand Down
6 changes: 3 additions & 3 deletions man/Log_R_bar.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Log_R_bar}
\alias{Log_R_bar}
\title{Compute LOG population growth rate under stabilizing selection}
\usage{
Log_R_bar(R0, logWbar)
}
\arguments{
\item{logWbar}{log average fitness}

\item{R0}{basic reproductive number}

\item{logWbar}{log average fitness}
}
\description{
Compute LOG population growth rate under stabilizing selection
Expand Down
2 changes: 1 addition & 1 deletion man/Log_W_bar.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Log_W_bar}
\alias{Log_W_bar}
\title{Compute mean fitness under stabilizing selection}
Expand Down
2 changes: 1 addition & 1 deletion man/Log_W_bar_lethal.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Log_W_bar_lethal}
\alias{Log_W_bar_lethal}
\title{Mean fitness -- with constraint, need to make as function of environment...}
Expand Down
2 changes: 1 addition & 1 deletion man/Pheno_demo.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Pheno_demo}
\alias{Pheno_demo}
\title{Compute trait + demographic change under stabilizing selection as function of environment}
Expand Down
2 changes: 1 addition & 1 deletion man/Pheno_demo_econ.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Pheno_demo_econ}
\alias{Pheno_demo_econ}
\title{Compute trait + demographic change under stabilizing selection as function of environment via Lande Chevin
Expand Down
2 changes: 1 addition & 1 deletion man/Pheno_demo_lande.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Pheno_demo_lande}
\alias{Pheno_demo_lande}
\title{Compute trait + demographic change under stabilizing selection as function of environment via Lande Chevin}
Expand Down
2 changes: 1 addition & 1 deletion man/Pheno_lande.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Pheno_lande}
\alias{Pheno_lande}
\title{Compute trait change under stabilizing selection as function of environment}
Expand Down
2 changes: 1 addition & 1 deletion man/R_bar.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{R_bar}
\alias{R_bar}
\title{Compute population growth rate under stabilizing selection}
Expand Down
27 changes: 27 additions & 0 deletions man/R_bar_dd.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{R_bar_dd}
\alias{R_bar_dd}
\title{Compute population growth rate under stabilizing selection}
\usage{
R_bar_dd(R0, Wbar, N, K, thetaL)
}
\arguments{
\item{R0}{basic reproductive number}

\item{Wbar}{average fitness}

\item{N}{number of individuals in this generation}

\item{K}{carrying capacity}

\item{thetaL}{theta-logistic parameter for density dependence}
}
\description{
Compute population growth rate under stabilizing selection
}
\details{
Assumes theta-logistic population regulation
would be good to have separate DD function specified after
chevin and lande 2010
}

2 changes: 1 addition & 1 deletion man/Va.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{Va}
\alias{Va}
\title{Va additive genetic variance in the phenotype as a function of the environment}
Expand Down
6 changes: 3 additions & 3 deletions man/W_bar.Rd
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
% Generated by roxygen2 (4.0.1): do not edit by hand
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{W_bar}
\alias{W_bar}
\title{Compute mean fitness under stabilizing selection}
\usage{
W_bar(zbar, theta, Oz2, gamma, LOG)
}
\arguments{
\item{LOG}{(=TRUE) whether to return the log of fitness}

\item{zbar}{mean trait prior to selection}

\item{theta}{enironmental optimum}

\item{Oz2}{strength of stabilizing selection}

\item{gamma}{1/(Oz2 + Vz2), with Vz2 phenotypic variance}

\item{LOG}{(=TRUE) whether to return the log of fitness}
}
\description{
Compute mean fitness under stabilizing selection
Expand Down
29 changes: 0 additions & 29 deletions man/pdLande.Rd

This file was deleted.

29 changes: 0 additions & 29 deletions man/pdLandeT.Rd

This file was deleted.

32 changes: 0 additions & 32 deletions man/pdRespVarLoad.Rd

This file was deleted.

Loading

0 comments on commit a5cdfd0

Please sign in to comment.