diff options
author | Ken Kellner <ken@kenkellner.com> | 2022-11-10 14:52:43 -0500 |
---|---|---|
committer | Ken Kellner <ken@kenkellner.com> | 2022-11-10 14:52:43 -0500 |
commit | b8f489b6e8e3995386ab4b020ad8d0e4a24fb04a (patch) | |
tree | 6a64eb1d06400cbe77027df37ea90e64e2a673d6 | |
parent | 33ea444a2d8aec16e823cdfd77522bbc6daa2219 (diff) |
Clean up check
-rw-r--r-- | R/power.R | 2 | ||||
-rw-r--r-- | man/shinyPower.Rd | 16 | ||||
-rw-r--r-- | man/unmarkedPowerList.Rd | 6 |
3 files changed, 22 insertions, 2 deletions
@@ -426,7 +426,7 @@ shinyPower <- function(object, ...){ if(!inherits(object, "unmarkedFit")){ stop("Requires unmarkedFit object", call.=FALSE) } - if(!require(shiny)){ + if(!requireNamespace("shiny")){ stop("Install the shiny library to use this function", call.=FALSE) } options(unmarked_shiny=TRUE) diff --git a/man/shinyPower.Rd b/man/shinyPower.Rd new file mode 100644 index 0000000..ef338aa --- /dev/null +++ b/man/shinyPower.Rd @@ -0,0 +1,16 @@ +\name{shinyPower} +\alias{shinyPower} +\title{Launch a Shiny app to help with power analysis} +\description{ + Launch a Shiny app to test power under various scenarios. Requires the Shiny + package to be installed. +} +\usage{ +shinyPower(object, ...) +} +\arguments{ + \item{object}{A template \code{unmarkedFit} object; see + documentation for \code{powerAnalysis} for details on how to create this} + \item{...}{Currently ignored} +} +\value{No return value, called for its side effects.} diff --git a/man/unmarkedPowerList.Rd b/man/unmarkedPowerList.Rd index 335d82b..3dbbcf1 100644 --- a/man/unmarkedPowerList.Rd +++ b/man/unmarkedPowerList.Rd @@ -23,7 +23,7 @@ \usage{ \S4method{unmarkedPowerList}{list}(object, ...) \S4method{unmarkedPowerList}{unmarkedFit}(object, coefs, design, alpha=0.05, - nsim=100, parallel=FALSE, ...) + nulls=list(), nsim=100, parallel=FALSE, ...) \S4method{show}{unmarkedPowerList}(object) \S4method{summary}{unmarkedPowerList}(object, ...) \S4method{plot}{unmarkedPowerList,ANY}(x, power=NULL, param=NULL, ...) @@ -41,6 +41,10 @@ number of observations. If you have >1 primary period a \code{T} column must also be provided} \item{alpha}{Type I error rate} + \item{nulls}{If provided, a list matching the structure of \code{coefs} which + defines the null hypothesis value for each parameter. By default the null + is 0 for all parameters. + } \item{nsim}{The number of simulations to run for each scenario/study design} \item{parallel}{If \code{TRUE}, run simulations in parallel} \item{power}{When plotting, the target power. Draws a horizontal line |