Factors are kept in R as a vector of integer values with a corresponding set of character values to use when displaying the factor. To make a factor, use the factor function. The only argument needed for factoring is a vector of values, which will be returned as a vector of factor values.
In R, the command factor() with a vector as input is used to build or alter a factor. The following are the two steps in creating a factor: The process of creating a vector. Using function factor to convert the produced vector into a factor ()
Factor variables are also useful in a variety of graphic kinds. Additionally, keeping string variables as factor variables makes better use of memory. The factor function is used to produce a factor variable. A vector of values, which might be text or numeric, is the only needed argument.
The levels() function gives you access to a variable's levels attribute. The first form sets the attribute, whereas the second returns the value of the levels of its argument.
Learner's Ratings
4.2
Overall Rating
67%
19%
4%
3%
7%
Reviews
A
ajay kumar mishra
5
I AM WAITING FOR LONG TIME THIS COURSE
THANKS FOR UPLOAD THIS COURSE
AGAIN THANKS ALL TEAM MEMBERS
K
Khurram
5
so far so good
M
Meet Shah
5
Get impressed by your way of teaching. Good and interesting. this is very helpful. Thank you :)
P
Prabhat Yadav
5
Amazing content and easy to understand.
A
Ankush Kumar
5
Much better for biggner
M
Muhammad Farooq
5
I have Zero knowledge of programming but with this video got some information " What R is " I hope with little more practice can do better than this one. Thanks
M
manjeet
5
Very help full course
R
Rajachandra Voodiga
4
very well explained
A
Amol Barkule
4
The R Programming Course was good and included all the topics to find a good job in my City.
L
Laxman
5
The R Programming Course was good and included all the topics to find a good job in my City.
Share a personalized message with your friends.