# create some data in all-characters.
x = data.frame(
char = c( 'abc', 'def' ),
num = c( '1', '2' ),
date = c( '1/1/2018', '2018-2-01' ),
na = c( NA, NA ),
bool = c( 'TRUE', 'FALSE' ),
stringsAsFactors = FALSE
)
# different atype options. Note how the output types change.
str( atype( x ) )
str( atype( x, exclude = 'date' ) )
str( atype( x, auto_convert_dates = FALSE ) )
str( atype( x, check_logical = FALSE ) )
Run the code above in your browser using DataLab