How to plot in R like this(same as the graphs) ? Could you please post the R code in your answer?
I am a R beginner and I find it is difficult to plot in R for me.


Thank you !
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.
The bottom graph is called a “parallel coordinates plot”. You can do a quick Google search to find several ways of doing this in R. Here are two, both using the “iris” dataset.
ggplot2
With this approach, you basically say which columns have the data you want to plot, and specify your grouping variable using
geom_line().MASS
The approach here is similar. First specify your data, then specify how your data are grouped (in the case of the “iris” dataset, there are three species, with 50 observations each).