Need help in R coding

Hi All,
I'm new to R language. While come across some pilot projects, i struck at this below question. please help me to solve this.
Question : * Create a factor color of 3 colors (Red/Green/Blue).

  • Find the number of levels and print it.

code i made :
color <- factor(c("Red","Green","Blue")

after factor you opened a bracket , after c you opened another, then after specifying the colour entries you closed only one of the two brackets, so the other remains open.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.