select_cat {catcont}R Documentation

select_cat, select_cont

Description

Select columns by type

Usage

select_cat(.data)

## Default S3 method:
select_cat(.data)

## S3 method for class 'data.table'
select_cat(.data)

select_cont(.data)

## Default S3 method:
select_cont(.data)

## S3 method for class 'data.table'
select_cont(.data)

Arguments

.data

table

Details

select_cat() and select_cont() return only the categorical and continuous types respectively. This is closely mirrors the dplyr function select but works with non-table values as well.

Value

Returns a table-like object of the same class as data unless there are no columns in which case 'NULL' is returned

Examples


  data(iris)
  select_cat(iris)
  select_cont(iris)

## Not run: 
  setDT(iris)
  select_cat(iris)
  select_cont(iris)

## End(Not run)

[Package catcont version 0.5.0 Index]