To display the output (instead of returning a string), see
rcat().
For evaluating and postprocessing an RSP document and
writing the output to a file, see rfile().
x <- rstring("A random integer in [1,100]: <%=sample(1:100, size=1)%>
")
cat(x)
# Passing argumentsx <- rstring("A random integer in [1,<%=K%>]: <%=sample(1:K, size=1)%>
", args=list(K=50))
cat(x)