I know that file.create() can generate an empty file, but my request is to generate an R script filled with specific text, such as
#' This is specific text
#' So is this
foo <- function(x){
bar(x)
}
How can I save this text in a way that it populates a file I generate via file.create() or through some other function?