Skip to content

Commit

Permalink
Merge pull request #83 from droglenc/rd-work
Browse files Browse the repository at this point in the history
Rd work
  • Loading branch information
droglenc committed Jun 1, 2021
2 parents dcde0cd + 57bbef6 commit 9f39824
Show file tree
Hide file tree
Showing 23 changed files with 309 additions and 256 deletions.
2 changes: 1 addition & 1 deletion R/FSA-defunct.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Defunct functions.
#' @title DEFUNCT functions.
#' @description These functions were once part of FSA but have now been removed.
#' @param \dots Additional arguments to pass through.
#' @name FSA-defunct
Expand Down
15 changes: 8 additions & 7 deletions R/FSAUtils.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' @name FSAUtils
#'
#' @title Capitalizes the first letter of first or all words in a string.
#'
#' @description Capitalizes the first letter of first or all words in a string.
Expand Down Expand Up @@ -196,7 +194,8 @@ fishR <- function(where=c("home","IFAR","general","books",
invisible(tmp)
}


#' @name fsaNews
#'
#' @title Read news and changes for the 'FSA' package.
#'
#' @description Opens up the \href{https://github.com/droglenc/FSA/blob/master/NEWS.md}{News.md GitHub file} for the \sQuote{FSA} package in an external browser.
Expand Down Expand Up @@ -404,7 +403,7 @@ logbtcf <- function(obj,base=exp(1)) {
}


#' @name oddeven
#' @name is.odd
#'
#' @title Determine if a number is odd or even.
#'
Expand All @@ -418,6 +417,8 @@ logbtcf <- function(obj,base=exp(1)) {
#'
#' @keywords manip
#'
#' @aliases is.odd is.even
#'
#' @examples
#' ## Individual values
#' is.odd(1)
Expand All @@ -430,11 +431,11 @@ logbtcf <- function(obj,base=exp(1)) {
#' data.frame(d,odd=is.odd(d),even=is.even(d))
NULL

#' @rdname oddeven
#' @rdname is.odd
#' @export
is.odd <- function (x) iOddEven(x,1)

#' @rdname oddeven
#' @rdname is.odd
#' @export
is.even <- function(x) iOddEven(x,0)

Expand Down Expand Up @@ -866,7 +867,7 @@ se <- function (x,na.rm=TRUE) {
#' levels(iris.set3$Species)
#' xtabs(~Species,data=iris.set3)
#'
#' @rdname filterD-deprecated
#' @rdname filterD
#' @export
filterD <- function(x,...,except=NULL) {
.Deprecated(msg="'filter' is deprecated and will soon be removed from 'FSA'; please use 'droplevels' after 'subset' or 'dplyr::filter' for the same result (see fishR post from 26-May-2021).")
Expand Down
4 changes: 1 addition & 3 deletions R/bootstrap.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' @name bootstrap
#'
#' @title Associated S3 methods for bootstrap results from car::Boot.
#'
#' @description S3 methods are provided to construct non-parametric bootstrap confidence intervals, predictions with non-parametric confidence intervals, hypothesis tests, and plots of the parameter estimates for objects returned from \code{\link[car]{Boot}} from \pkg{car}.
Expand Down Expand Up @@ -188,7 +186,7 @@ hist.boot <- function(x,same.ylim=TRUE,ymax=NULL,
#'
#' @seealso \code{\link[car]{Boot}} and related methods in \pkg{car} and \code{summary.\link[nlstools]{nlsBoot}} in \pkg{nlstools}.
#'
#' @aliases confint.nlsboot htest.nlsboot predict.nlsbooot
#' @aliases confint.nlsBoot htest.nlsBoot predict.nlsBoot
#'
#' @keywords htest
#'
Expand Down
20 changes: 10 additions & 10 deletions R/deprecated_fitPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@
#' fitPlot(glm1)
#' fitPlot(glm1,yaxis1.ticks=c(0,1),yaxis1.lbls=c(0,1))
#'
#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot <- function (object, ...) {
if ("lm" %in% class(object)) ## This is a hack so no double deprecation warning
.Deprecated(msg="'fitPlot' is deprecated and will soon be removed from 'FSA'; see fishR post from 25-May-2021 for alternative methods.")
UseMethod("fitPlot")
}

#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.lm <- function(object, ...) {
object <- iTypeoflm(object)
Expand All @@ -137,7 +137,7 @@ fitPlot.lm <- function(object, ...) {
fitPlot(object,...)
}

#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.SLR <- function(object,plot.pts=TRUE,pch=16,col.pt="black",
col.mdl="red",lwd=3,lty=1,
Expand Down Expand Up @@ -196,7 +196,7 @@ fitPlot.SLR <- function(object,plot.pts=TRUE,pch=16,col.pt="black",
}


#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.IVR <- function(object,...) {
## Do some checks
Expand Down Expand Up @@ -369,14 +369,14 @@ iFitPlotIVR2 <- function(object,plot.pts=TRUE,pch=c(16,21,15,22,17,24,c(3:14)),
} # nocov end
}

#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.POLY <- function(object,...) {
fitPlot.SLR(object,...)
}


#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.ONEWAY <- function (object,
xlab=object$Enames[1],ylab=object$Rname,main="",
Expand Down Expand Up @@ -410,7 +410,7 @@ fitPlot.ONEWAY <- function (object,
} # nocov end


#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.TWOWAY <- function(object,which,change.order=FALSE,
xlab=object$Enames[ord[1]],ylab=object$Rname,
Expand Down Expand Up @@ -465,7 +465,7 @@ fitPlot.TWOWAY <- function(object,which,change.order=FALSE,
}


#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.nls <- function(object,d,
pch=c(19,1),col.pt=c("black","red"),col.mdl=col.pt,
Expand Down Expand Up @@ -544,7 +544,7 @@ fitPlot.nls <- function(object,d,
}
} # nocov end

#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.glm <- function(object, ...) {
if (object$family$family=="binomial" & object$family$link=="logit")
Expand All @@ -553,7 +553,7 @@ fitPlot.glm <- function(object, ...) {
STOP("Currently only logistic regression GLM models are supported by fitPlot.")
}

#' @rdname fitPlot-deprecated
#' @rdname fitPlot
#' @export
fitPlot.logreg <- function(object,
xlab=names(object$model)[2],ylab=names(object$model)[1],
Expand Down
8 changes: 5 additions & 3 deletions R/stockRecruitment.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @name stockRecruitment
#' @name srFuns
#'
#' @title Creates a function for a specific parameterization of a common stock-recruitment function .
#'
Expand Down Expand Up @@ -37,6 +37,8 @@
#'
#' @keywords manip
#'
#' @aliases srFuns srFunShow
#'
#' @examples
#' ## See the formulae
#' ## Simple Examples
Expand Down Expand Up @@ -105,7 +107,7 @@

NULL

#' @rdname stockRecruitment
#' @rdname srFuns
#' @export
srFuns <- function(type=c("BevertonHolt","Ricker","Shepherd",
"SailaLorda","independence"),
Expand Down Expand Up @@ -239,7 +241,7 @@ srFuns <- function(type=c("BevertonHolt","Ricker","Shepherd",
get(type)
}

#' @rdname stockRecruitment
#' @rdname srFuns
#' @export
srFunShow <- function(type=c("BevertonHolt","Ricker","Shepherd","SailaLorda"),
param=1,plot=FALSE,...) {
Expand Down
3 changes: 2 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ reference:
- binCI
- hyperCI
- poiCI
- bootstrap
- boot
- dunnTest
- extraSS
- geomean
Expand All @@ -100,6 +100,7 @@ reference:
- ksTest
- logbtcf
- lrt
- nlsBoot
- nlsTracePlot
- pcumsum
- rSquared
Expand Down
Loading

0 comments on commit 9f39824

Please sign in to comment.