0

Here is the table in Excel:

Table of data and graph in Excel

Here is my head(df) in R:

Head(df) in R

Here is my Code:

##Import CSV
df<-read.csv("Sentiment Matrix.csv")
##Check top of df
> dput(head(df))
structure(list(Journey.Area = c("Installing", "Using Product", 
"Installing", "Delivery", "Installing", "Delivery"), Experience.Framework = c("People/Associate", 
"Execution", "People/Associate", "Execution", "People/Associate", 
"People/Associate"), Postive.or.Negative = c(1L, 0L, 1L, 0L, 
0L, 1L)), row.names = c(NA, 6L), class = "data.frame")

##Plot????
M. Carter
  • 23
  • 5
  • 4
    Please read about [how to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and update your question accordingly. Include a sample of your data by pasting the output of `dput()` into your post or `dput(head())` if you have a large data frame. Also include code you have tried and any relevant errors. If you cannot post your data, then please post code for creating representative data. – LMc May 13 '22 at 20:36
  • You can make a grouped horizontal bar chart using the [`ggplot2`](https://ggplot2.tidyverse.org/) package. – LMc May 13 '22 at 20:41

1 Answers1

0

Stack Overflow is a great tool, but the people here needs that you "help us help you". Please consider editing your question.

That said, you could use the great ggplot2 package:

library(ggplot2)

ggplot(df, aes(x = Journey.Area, y = Positive.or.Negative, fill = Experience.Framework))+
       geom_col()+
       coord_flip()
PavoDive
  • 6,322
  • 2
  • 29
  • 55
  • This is so close to what I'm looking for. I want the y = count of occurrence though rather than the Positive.or.Negative. Is there a way to change that up? – M. Carter May 13 '22 at 20:55
  • 1
    try `geom_bar`. **Please** edit your question above as suggested ... – Ben Bolker May 13 '22 at 20:57