this is my first post on Stack so any help would be appreciated. If I need to rephrase my question or be more specific please let me know.
I am attempting to create a figure containing both a plot, and a table relating to that plot. I am able to produce the plot but my table is too long and subsequently overlaps with my bar chart. Below is dummy code to reproduce the problem.
My Question is this. Is there any way to split my table into n parts so that it fits neatly underneath my bar chart? I have several data frames to do this for of varying sizes, so a manual row-wise sub-setting to produce multiple tables is not preferred. Any help would be appreciated.
catg <- rnorm(50)
amts <- rnorm(50)
data <- data.frame(catg,amts)
plt1 <- ggplot(data,aes(x=catg,y=amts))+
tbl1 <- tableGrob(amts)
I don't know what you have in mind but maybe reshape those values into N columns (and round the numbers)?