is_dataframe: Is data frame

Description Arguments Examples

View source: R/is-dataframe.r

Description

is_dataframe tests if an object is a data frame
is_numeric_dataframe tests if an object is a numeric data frame
is_string_dataframe tests if an object is a string data frame
is_factor_dataframe tests if an object is a factor data frame
is_not_dataframe tests if an object is not a data frame

Arguments

x

an R object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
is_dataframe(iris) # TRUE
is_dataframe(1:10) # FALSE

is_numeric_dataframe(iris) # FALSE
is_numeric_dataframe(iris[,1:4]) # TRUE

DF = matrix(letters[1:24], 6, 4)
DF1 = data.frame(DF)
DF2 = data.frame(DF, stringsAsFactors=FALSE)

is_string_dataframe(DF1) # FALSE
is_string_dataframe(DF2) # TRUE

is_factor_dataframe(DF1) # TRUE
is_factor_dataframe(DF2) # FALSE

tester documentation built on May 30, 2017, 4:20 a.m.