This may be a strange request, and there is not much I can do to actually show an example. Though I will try my hardest. Let's say I have an R script, such as a simple one that looks like this:
library(lubridate)
setwd("")
df=read.csv("...")
df=df[df$month != "" & !is.na(df$month),]
colnames(df)[3]="metric"
Is there now a way, to return a string which contains the actual text in my script? Or a creative way to save the information and read it back into the environment. For instance, I would like to create a string variable which is equal to:
"
library(lubridate)
setwd("")
df=read.csv("...")
df=df[df$month != "" & !is.na(df$month),]
colnames(df)[3]="metric""