Vidyalelo
R Programming · Q116

R Programming Basics

Programming · R Programming · question 116

Q116

Which of the following is valid assignment?

A.
> x <- fact(c("yes", "yes", "no", "yes", "no"))
B.
> x <- factor(c("yes", "yes", "no", "yes", "no"))
Answer
C.
> x <- factor(factor("yes", "yes", "no", "yes", "no"))
D.
> x <- factor(factor("yes", "no", "no", "yes", "no"))

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board