I’m new to R.
I have a a Data.frame with a column called “Symbol”.
Symbol
1 "IDEA"
2 "PFC"
3 "RPL"
4 "SOBHA"
I need to store its values as a vector(x = c("IDEA","PFC","RPL","SOBHA")). Which is the most concise way of doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
VitoshKa suggested to use the following code.
What you want depends on what you need. If you are using this vector for further analysis or plotting, retaining the factor nature of the vector is a sensible solution.
How these two methods differ: