tokenize_file | R Documentation |
Tools for tokenizing R code.
tokenize_file(path) tokenize_string(string) tokenize(file = "", text = NULL)
file, path |
A file path. |
text, string |
R code as a character vector of length one. |
A data.frame
with the following columns:
value | The token's contents, as a string. |
row | The row where the token is located. |
column | The column where the token is located. |
type | The token type, as a string. |
Line numbers are determined by existence of the \n
line feed character, under the assumption that code being tokenized
will use either \n
to indicate newlines (as on modern
Unix systems), or \r\n
as on Windows.
tokenize_string("x <- 1 + 2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.