readScript | R Documentation |
This is a general function that determines the type of the document and then extracts the code from it.
This is an S4 generic and so can be extended by other packages for document types that have a class, e.g. Word or OpenOffice documents.
readAnnotatedScript
is for reading scripts that use
a vocabulary to label code blocks with high-level task identifiers
to indicate what the code does in descriptive terms.
readScript(doc, type = NA, txt = readLines(doc), ...)
readAnnotatedScript(doc, txt = readLines(doc))
doc |
the document, typically a string giving the file name. This
can also be a connection, e.g. created via |
type |
a string indicating the type of the document. If this is
missing, the function calls |
txt |
the lines of text of the document. |
... |
Passed to low-level input functions used by various methods. |
A list of the R expressions that constitute the code blocks.
Duncan Temple Lang
parse
e = readScript( system.file ("samples", "dual.R", package = "CodeDepends") )
## Not run:
readScript(url("http://www.omegahat.net/CodeDepends/formula.R"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.