numericols: Numeric Columns Of Data Frame

Description Usage Arguments Value Author(s) Examples

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 2, 2019, 6:49 p.m.