library(stringr)
DF <- data.frame(group = c("SL", "AUS", "Italy"),
day1 = c(1 , 4 , 58),
day2 = c(2 , 4 , 78),
day3 = c(2 , 6 , 72),
day4 = c(5 , 14 , 94),
day5 = c(7 , 7 , 147),
day6 = c(10, 3 , 185),
day7 = c(15, 11 , 234),
day8 = c(9 , 9 , 573),
day9 = c(8 , 10 , 335),
day10 = c(12, 23 , 446),
day11 = c(6 , 12 , 587),
day12 = c(9 , 28 , 769),
day13 = c(10, 43 , 778),
day14 = c(5 , 49 , 1247),
day15 = c(0 , 52 , 1492),
day16 = c(4 , 101 , 1797),
day17 = c(0 , 54 , 977),
day18 = c(9 , 141 , 2313),
day19 = c(2 , 160 , 2651),
day20 = c(5 , 172 , 2547),
day21 = c(21, 144 , 3497),
day22 = c(3 , 537 , 3590),
day23 = c(5 , 278 , 3223),
day24 = c(8 , 430 , 3526),
day25 = c(7 , 359 , 4207))
DFtall <- str_sort(DF, numeric = TRUE)) %>% gather(key = Day, value = Value, day1:day25)
print(DFtall)
ggplot(DFtall, aes(Day, Value, fill = group)) + geom_col(position = "dodge")
I am very much new to Rstudio and now am facing an issue when trying to bar graph. Although the above code provides me a bar chart, Output of
I am new to Rstudio and now I am facing issues when I am working on the bar graph. The above code provides me the bar chart as an output