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!
you want droplevels
:
test <- subset(orchardsprays, treatment == "a") test <- droplevels(test) plot(test$treatment, test$decrease)
Comments
Post a Comment