Skip to content
Snippets Groups Projects
Commit 3a76228d authored by Fernando Mayer's avatar Fernando Mayer
Browse files

rename function and document package

parent d6991244
No related branches found
No related tags found
No related merge requests found
##' @title Convenience Functions, Small GUI to Teach Statistics and Some ##' @title Convenience Functions, Small GUI to Teach Statistics and Some
##' Datasets. ##' Datasets.
##' ##'
##' @description legTools is a collection of R functions and datasets, ##' @description legTools is a collection of R functions and datasets
##' maintained by the LEG group (Statistics and Geoinformation
##' Laboratory, Laboratório de Estatística e Geoinformação).
##' ##'
##' @docType package ##' @docType package
##' @name legTools ##' @name legTools
......
##' @title Drop unused levels after subset ##' @title Drop unused levels after subset
##' @name subset.drop.all ##' @name subsetDropAll
##' ##'
##' @description This function is designed to be used in place of ##' @description This function is designed to be used in place of
##' \code{\link[base]{subset}} when you want to drop off all empty ##' \code{\link[base]{subset}} when you want to drop off all empty
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
##' one or more levels emptied after the subset, will have this ##' one or more levels emptied after the subset, will have this
##' levels droped off. ##' levels droped off.
##' ##'
##' @author Fernando Mayer \email{fernando.mayer@ufpr.br} ##' @author Fernando Mayer
##' ##'
##' @seealso \code{\link[base]{subset}} ##' @seealso \code{\link[base]{subset}}
##' ##'
##' @export ##' @export
subset.drop.all <- function(x, ...){ subsetDropAll <- function(x, ...){
if(!is.data.frame(x)) stop("'x' must be a data.frame") if(!is.data.frame(x)) stop("'x' must be a data.frame")
x <- subset(x, ...) x <- subset(x, ...)
factors <- which(sapply(x, class) %in% "factor") factors <- which(sapply(x, class) %in% "factor")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment