Description Usage Arguments Value See Also Examples
readTemplate
reads file
and uses sprintf
to make string replacements when specified
1 | readTemplate(file, addLineBreaks = FALSE, ...)
|
file |
character value; path/name of the template file |
addLineBreaks |
logical value; include line breaks ( |
... |
objects to use as string replacements |
A character value containing the contents of f
after any
specified string replacements have been made.
1 2 3 4 5 6 | x <- c("select %s", "from %s", "where %s")
write(x, "x.sql")
readTemplate("x.sql", FALSE, "*", "Table", "1=1")
y <- readTemplate("x.sql", TRUE, "*", "Table", "1=1")
print(y)
write(y, "x2.sql")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.