Skip to content

Commit

Permalink
Closing out v0.9.2 (again, w some pkgdown fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
droglenc committed Feb 12, 2022
1 parent a8e517d commit b5a44ac
Show file tree
Hide file tree
Showing 20 changed files with 338 additions and 2,135 deletions.
18 changes: 0 additions & 18 deletions NAMESPACE
Expand Up @@ -22,15 +22,6 @@ S3method(confint,nlsBoot)
S3method(confint,removal)
S3method(dunnTest,default)
S3method(dunnTest,formula)
S3method(fitPlot,IVR)
S3method(fitPlot,ONEWAY)
S3method(fitPlot,POLY)
S3method(fitPlot,SLR)
S3method(fitPlot,TWOWAY)
S3method(fitPlot,glm)
S3method(fitPlot,lm)
S3method(fitPlot,logreg)
S3method(fitPlot,nls)
S3method(hist,boot)
S3method(hist,formula)
S3method(histFromSum,default)
Expand Down Expand Up @@ -59,14 +50,6 @@ S3method(rSquared,catchCurve)
S3method(rSquared,default)
S3method(rSquared,depletion)
S3method(rSquared,lm)
S3method(residPlot,IVR)
S3method(residPlot,ONEWAY)
S3method(residPlot,POLY)
S3method(residPlot,SLR)
S3method(residPlot,TWOWAY)
S3method(residPlot,lm)
S3method(residPlot,nlme)
S3method(residPlot,nls)
S3method(sumTable,formula)
S3method(summary,ageBias)
S3method(summary,agePrec)
Expand All @@ -79,7 +62,6 @@ S3method(summary,mrOpen)
S3method(summary,removal)
S3method(wrAdd,default)
S3method(wrAdd,formula)
export(FSANews)
export(GompertzFuns)
export(Mmethods)
export(RichardsFuns)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,8 +1,12 @@
# FSA 0.9.2 12-Feb-21
* Last version maintained by Derek Ogle. Transfering to fishR Core Team for next version.
* `filterD()`: **REMOVED** (to `FSAmisc`).
* `fitPlot()`: **REMOVED** (to `FSAmisc`).
* `fsaNews()` and `FSANews()`: **Removed**.
* `psdAdd()`: Modified. Changed the way `PSDlit` was loaded into the function environment so that `FSA::psdAdd()` will work. Addresses [#85](https://github.com/droglenc/FSA/issues/85).
* `PSDLit`: Modified. Added info for Utah Chub (from [here](https://webpages.uidaho.edu/quistlab/publications/NAJFM_2021_Black_et_al_UTC_Ws_length_categories.pdf); address [#84](https://github.com/droglenc/FSA/issues/84)).
* `psdVal()`: Modified. Changed the way `PSDlit` was loaded into the function environment so that `FSA::psdVal()` will work. Addresses [#85](https://github.com/droglenc/FSA/issues/85).
* `residPlot()`: **REMOVED** (to `FSAmisc`).
* `wrAdd()`: Modified. Changed the way `WSlit` was loaded into the function environment so that `FSA::wrAdd()` will work. Addresses [#85](https://github.com/droglenc/FSA/issues/85).
* `WSLit`: Modified. Added info for Utah Chub (from [here](https://webpages.uidaho.edu/quistlab/publications/NAJFM_2021_Black_et_al_UTC_Ws_length_categories.pdf); address [#84](https://github.com/droglenc/FSA/issues/84)).
* `wsVal()`: Modified. Changed the way `WSlit` was loaded into the function environment so that `FSA::wsVal()` will work. Addresses [#85](https://github.com/droglenc/FSA/issues/85).
Expand Down
24 changes: 24 additions & 0 deletions R/FSA-defunct.R
Expand Up @@ -33,6 +33,24 @@ diags <- function(...) {
.Defunct(msg="'diags' has been removed (to 'FSAmisc' on GitHub).")
}

#' @rdname FSA-defunct
#' @export
filterD <- function(...) {
.Defunct(msg="'filter' has been removed (to 'FSAmisc' on GitHub); please use 'droplevels' after 'subset' or 'dplyr::filter' for the same result (see fishR post from 26-May-2021).")
}

#' @rdname FSA-defunct
#' @export
fitPlot <- function(...) {
.Defunct(msg="'fitPlot' has been removed (to 'FSAmisc' on GitHub).")
}

#' @rdname FSA-defunct
#' @export
fsaNews <- FSANews <- function(...) {
.Defunct(msg="'fsaNews' and 'FSANews' have been removed (to 'FSAmisc' on GitHub).")
}

#' @rdname FSA-defunct
#' @export
hoCoef <- function(...) {
Expand All @@ -51,6 +69,12 @@ plotBinResp <- function(...) {
.Defunct(msg="'plotBinResp' has been removed; use 'ggplot2' as described in the fishR blog post of 25-May-2021.")
}

#' @rdname FSA-defunct
#' @export
residPlot <- function(...) {
.Defunct(msg="'residPlot' has been removed (to 'FSAmisc' on GitHub).")
}

#' @rdname FSA-defunct
#' @export
Subset <- function(...) {
Expand Down
82 changes: 0 additions & 82 deletions R/FSAUtils.R
Expand Up @@ -194,39 +194,6 @@ 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.
#'
#' @aliases fsaNews FSANews
#'
#' @return None.
#'
#' @author Derek H. Ogle, \email{derek@@derekogle.com}
#'
#' @keywords manip
#'
#' @examples
#' \dontrun{
#' ## Opens an external webpage ... only run interactively
#' FSANews()
#' }
#'
#' @rdname fsaNews
#' @export
fsaNews <- function () {
utils::browseURL("https://github.com/droglenc/FSA/blob/master/NEWS.md")
}

#' @rdname fsaNews
#' @export
FSANews <- function () {
fsaNews()
}


#' @title Shows rows from the head and tail of a data frame or matrix.
#'
#' @description Shows rows from the head and tail of a data frame or matrix.
Expand Down Expand Up @@ -829,55 +796,6 @@ se <- function (x,na.rm=TRUE) {
sqrt(stats::var(x)/length(x))
}

#' @name filterD-deprecated
#'
#' @title DEPRECATED - Subsets/filters a data frame and drops the unused levels.
#'
#' @description Subsets/filters a data frame and drops the unused levels.
#'
#' @details Newbie students using R expect that when a factor variable is filtered with \code{\link[dplyr]{filter}} that any original levels that are no longer used after the filtering will be ignored. This, however, is not the case and often results in tables with empty cells and figures with empty bars. One remedy is to use \code{\link[base]{droplevels}} immediately following \code{\link[dplyr]{filter}}. This generally becomes a repetitive sequence for most newbie students; thus, \code{filterD} incorporate these two functions into one function.
#'
#' \code{filterD} is a wrapper for \code{\link[dplyr]{filter}} from \pkg{dplyr} followed by \code{\link[base]{droplevels}} just before the data.frame is returned. Otherwise, there is no new code here.
#'
#' This function is only used for data frames.
#'
#' @param x A data frame.
#' @param except Indices of columns from which NOT to drop levels.
#' @param \dots further arguments to be passed to \code{\link[dplyr]{filter}}.
#'
#' @return A data frame with the filtered rows.
#'
#' @author Derek H. Ogle, \email{derek@@derekogle.com}
#'
#' @section IFAR Chapter: Basic Data Manipulations.
#'
#' @seealso See \code{subset} and \code{\link[dplyr]{filter}} from \pkg{dplyr} for similar functionality. See \code{drop.levels} in \pkg{gdata} and \code{droplevels} for related functionality.
#'
#' @keywords misc
#'
#' @examples
#' ## The problem -- note use of unused level in the final table.
#' levels(iris$Species)
#' iris.set1 <- subset(iris,Species=="setosa" | Species=="versicolor")
#' levels(iris.set1$Species)
#' xtabs(~Species,data=iris.set1)
#'
#' ## A fix using filterD
#' iris.set3 <- filterD(iris,Species=="setosa" | Species=="versicolor")
#' levels(iris.set3$Species)
#' xtabs(~Species,data=iris.set3)
#'
#' @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).")
res <- dplyr::filter(x,...)
res <- droplevels(res,except)
if (nrow(res)==0)
WARN("The resultant data.frame has 0 rows. Try str() on the result.\n")
res
}


#' @title Finds the number of valid (non-NA) values in a vector.
#'
Expand Down

0 comments on commit b5a44ac

Please sign in to comment.