Reputation: 1
this is my code:
ggplot(data = samplesolution2, aes(x = transdt, y = transAmount, group = bankAcctID, fill = bankAcctID)) +
geom_bar(stat = "identity") +
geom_test(label = rownames(data), nudge_x = 0.25, nudge_y = 0.25, check_overlap = T) +
ggtitle(label = "Showing Only Total Deposits Over $200") +
facet_wrap(~ bankAcctID, ncol = 1)
Error in geom_test(label = rownames(data), nudge_x = 0.25, nudge_y = 0.25, :
could not find function "geom_test"
And I want to add x and y value inside each bar.
Upvotes: 0
Views: 46
Reputation: 24770
I think you have two problems:
geom_text
rownames
instead of "data".ggplot(data = samplesolution2,
aes(x = transdt, y = transAmount, group = bankAcctID, fill = bankAcctID)) +
geom_bar(stat = "identity") +
geom_text(label = rownames(samplesolution2), nudge_x = 0.25, nudge_y = 0.25, check_overlap = T) +
ggtitle(label = "Showing Only Total Deposits Over $200") +
facet_wrap(~ bankAcctID, ncol = 1)
Upvotes: 1