convert.magic {petersenlab} | R Documentation |
Convert Variable Types.
Description
Converts variable types of multiple columns of a dataframe at once.
Usage
convert.magic(obj, type)
Arguments
obj |
name of dataframe (object) |
type |
type to convert variables to one of:
|
Details
Converts variable types of multiple columns of a dataframe at once. Convert variable types to character, numeric, or factor.
Value
Dataframe with columns converted to a particular type.
See Also
Other dataManipulation:
columnBindFill()
,
dropColsWithAllNA()
,
dropRowsWithAllNA()
Other conversion:
convertHoursAMPM()
,
convertToHours()
,
convertToMinutes()
,
convertToSeconds()
,
percentileToTScore()
,
pom()
Examples
# Prepare Data
data("USArrests")
# Check if any rows are not NA
convert.magic(USArrests, "character")
[Package petersenlab version 1.0.0 Index]