Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

what is factor in r programming

# Create a vector as input.
data <- c("East","West","East","North","North","East","West","West","West","East","North")

print(data)
print(is.factor(data))

# Apply the factor function.
factor_data <- factor(data)

print(factor_data)
print(is.factor(factor_data))
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #factor #programming
ADD COMMENT
Topic
Name
4+6 =