Learn R Programming

sourcetools (version 0.1.1)

tokenize_file: Tokenize R Code

Description

Tools for tokenizing Rcode.

Usage

tokenize_file(path)

tokenize_string(string)

Arguments

path
A file path.
string
Rcode as a character vector of length one.

Value

  • A data.frame with the following columns:

    ll{ 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. }

Examples

Run this code
tokenize_string("x <- 1 + 2")

Run the code above in your browser using DataLab