Description Usage Arguments Details Examples
The function BEGIN.Python allows interactive development but doesn't work in combination with the function source. Therefore pySource provides an alternative to the function source which also can handle BEGIN.Python statements.
1 2 3 4 5 | pySource(file, local = FALSE, echo = verbose, print.eval = echo,
verbose = getOption("verbose"), prompt.echo = getOption("prompt"),
max.deparse.length = 150, chdir = FALSE,
encoding = getOption("encoding"), continue.echo = getOption("continue"),
skip.echo = 0, keep.source = getOption("keep.source"))
|
file |
a character string giving the pathname of the file. |
local |
see documentation of source |
echo |
see documentation of source |
print.eval |
see documentation of source |
verbose |
see documentation of source |
prompt.echo |
see documentation of source |
max.deparse.length |
see documentation of source |
chdir |
see documentation of source |
encoding |
see documentation of source |
continue.echo |
see documentation of source |
skip.echo |
see documentation of source |
keep.source |
see documentation of source |
The function pySource works similar to source, but code which is enclosed between BEGIN.Python and END.Python is replaced by pyExec and the quoted version of the code.
1 2 3 4 5 6 7 | ## Not run:
writeLines(c("x <- 3", "BEGIN.Python()",
"x=3**3", "print(3*u'Hello R!\\n')",
"END.Python"), "myMixedCode.R")
pySource("myMixedCode.R")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.