May Know what know is there in the below code. I am trying to extract distinct values of Species under iris but not getting . I am trying to code without %>%
iris[,c(distinct("Species"))]
May Know what know is there in the below code. I am trying to extract distinct values of Species under iris but not getting . I am trying to code without %>%
iris[,c(distinct("Species"))]
I am guessing you want to do this:
library(dplyr)
distinct(iris, Species)
you do not need %>% to begin with, but if you mean that you don't want to use the dplyr package, maybe you can try what @sm925 suggested as a comment: as.character(unique(iris$Species))