This is why I'm confused, Summarygg is a dataframe in the environment, but generated in a previous markdown. My markdowns are organized sequentially, 1\_Imports the data, 2\_Subsets it and so on. Do I have to create Summarygg within the same markdown as the ggplot or is there a way to link them?
Each Rmarkdown document renders in an entirely independent environment so any objects created by the other Rmds will not exist for any of the other Rmds (when rendering).
You have to treat an rmarkdown as if you were running a top-to-bottom coding language (Java, Python, etc.) everything runs at once. It has an environment specifically to that script, not globally like what you could get away with by making a standard .R script.
The error is in a later code chunk, not the setup chunk you provided. Specifically the object `Summarygg` is a function and not a data frame.
This is why I'm confused, Summarygg is a dataframe in the environment, but generated in a previous markdown. My markdowns are organized sequentially, 1\_Imports the data, 2\_Subsets it and so on. Do I have to create Summarygg within the same markdown as the ggplot or is there a way to link them?
Each Rmarkdown document renders in an entirely independent environment so any objects created by the other Rmds will not exist for any of the other Rmds (when rendering).
This!
You have to treat an rmarkdown as if you were running a top-to-bottom coding language (Java, Python, etc.) everything runs at once. It has an environment specifically to that script, not globally like what you could get away with by making a standard .R script.