numericols: Numeric Columns Of Data Frame

Description Usage Arguments Value Author(s) Examples

View source: R/visible_utilities.R

Description

Extract numerical columns from a data frame.

Usage

1
numericols(x, include.logical=TRUE)

Arguments

x

a data frame with at least one numerical column.

include.logical

logical; if TRUE, logical columns will be considered numerical.

Value

A data frame containing the numerical columns of x.

Author(s)

Daniel Dvorkin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x = data.frame(number=1:3, species=c("cat", "dog", "rat"),
        forsale=c(TRUE, FALSE, TRUE))
numericols(x)
#   number forsale
# 1      1    TRUE
# 2      2   FALSE
# 3      3    TRUE
numericols(x, FALSE)
#   number
# 1      1
# 2      2
# 3      3


lcmix documentation built on May 21, 2017, 4:05 a.m.
Search within the lcmix package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.