We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the top of my code, I have something like:
caption = paste(c("Parent Dir: dosefindingtoolbox/Rmarkdown", "Rmarkdown: Efficacy_Data_Overview_Plots.Rmd", "Output: Efficacy_Data_Overview_Plots.html", paste0("Timestamp: ", Sys.time())), collapse = "\n")
And then when I’m building the graphic, I have this:
g = g + labs(caption = caption)
Or another idea is at the top of the code to type something like
gcaption = theme(plot.caption = element_text(hjust = 0.5)) + labs(caption = paste0(dirs$top.local,"\n", file.path(dirs$scripts.local, Rname),"\n", file.path(dirs$scripts.local, Rmd_In),"\n", file.path(dirs$results.local, Rmd_Out)))
then, later on in the code you can use
g = g + gcaption
The text was updated successfully, but these errors were encountered:
Here's the implementation of the above that is working properly.
Rmd_name = "Filename.Rmd" caption = paste(c(dirs$parent_dir, Rmd_name, str_replace(Rmd_name, ".Rmd$", ".html"), paste(Sys.time())), collapse = "\n") ggcaption = list(labs(caption = caption), theme(plot.caption = element_text(hjust = 0.5))) ggplot(cars, aes(x=speed, y=dist)) + geom_point() + ggcaption
Sorry, something went wrong.
No branches or pull requests
At the top of my code, I have something like:
And then when I’m building the graphic, I have this:
Or another idea is at the top of the code to type something like
then, later on in the code you can use
The text was updated successfully, but these errors were encountered: