ggplot2 - R boxplot ggplot issues -
ggplot2 - R boxplot ggplot issues -
i new in r , trying graphics using ggplot , bit of reverse engineering. have info frame as:
> info experiments percentages 1 72.11538 2 90.62500 3 91.52542 4 b 94.81132 5 b 96.95122 6 b 98.95833 7 c 83.75000 8 c 84.84848 9 c 91.12903 because , b similar experiments following
data$experiments[data$experiments == "b"] = "a" if now
ggplot(data, aes(x = experiments, y = percentages)) + geom_boxplot() i 1 box a, 1 c still label b!
is there way of getting rid of b on x axis?
thanks lot help
i'm guessing experiments in data factor. if run str(data), imagine experiments factor 3 levels: a, b, , c. default, strings turned factors when info frame created.
the thought of factors represent set of possible values, if not possibilities in actual data. there 2 ways prepare this.
convert column string
data$experiments <- as.character(data$experiments) or remove unused level in factor
data$experiments <- droplevels(data$experiment) r ggplot2 boxplot
Comments
Post a Comment