How to plot Subset data without the unselected data in R -


i want plot graph of (see below), after subsetting, r plotting variables, data of selected ones.

test<-subset(orchardsprays,treatment == "a") plot(test$treatment, test$decrease) 

so there way plot variable want without deleting in original data frame?

i don't want this! enter image description here

you want droplevels:

test <- subset(orchardsprays, treatment == "a") test <- droplevels(test) plot(test$treatment, test$decrease) 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -