Learn R Programming

shinyr (version 0.4.2)

getType: Get Type

Description

getType

Usage

getType(vec)

Value

type of the given vector

Arguments

vec

A vector of any choice, to detect between numeric or character

Author

Jayachandra N

Examples

Run this code
getType(iris$Species)
getType(as.factor(c(1,0,1,1,0,NA,1, NULL)))
getType(as.factor(c(1, NULL,0,1,1,0,1,'a')))
getType(c(1,2,3,4, NA))
getType(letters[1:4])

Run the code above in your browser using DataLab