Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check, Test, Determine and Investigate Whether a Vector is Categorical or Continuous

License

NotificationsYou must be signed in to change notification settings

decisionpatterns/catcont

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test For and Identify Categorical or Continuous Values

CRAN_Status_BadgeLicenseDownloads

CRAN_Status_BadgeLicense

This collection of methods and utilities allows for a working withvectors at a higher level abstraction, i.e. by whether they arecategorical (nominal) or continous. The functions allow for testing,identifying, selecting, mutating,etc. and work with bothatomic vectors and recursive objects (table and list-like) objects in atidyverse compliant way.

Installation

You can install from CRAN with:

install.packages("catcont")

You can install catcont from github with:

# install.packages("devtools")devtools::install_github("decisionpatterns/catcont")

Example

Tests

is_cat(letters)          # TRUEis_cat(factor(letters))  # TRUEis_cat(TRUE)             # TRUEis_cat(FALSE)            # TRUEis_cat(1:10)             # FALSEis_cat(rnorm(10))        # FALSEis_cat( Sys.Date() )     # FALSEis_cat( complex(1,2) )   # FALSE is_cont(letters)         # FALSEis_cont(factor(letters)) # FALSEis_cont(TRUE)            # FALSEis_cont(FALSE)           # FALSEis_cont(1:10)            # TRUEis_cont(rnorm(10))       # TRUEis_cont( Sys.Date() )    # TRUEis_cont( complex(1,2) )  # TRUE

Identification

# Atomic cat_cont(1:10)cat_cont(letters) # Recursive cat_cont(iris) which_cat(iris)which_cat( iris, names=TRUE )  which_cont(iris)which_cont( iris, names=TRUE )

Selection

iris %>% select_cat()iris %>% select_cont()

Mutation

iris %>% mutate_if_cat(...)iris %>% mutate_if_cont(...)

About

Check, Test, Determine and Investigate Whether a Vector is Categorical or Continuous

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2026 Movatter.jp