Split source lines into complete expressions
Parse the lines of code one by one to find complete expressions in the code, and put them in a list.
split_source(x)
x |
A character vector of R source code. |
A list of character vectors, and each vector contains a complete R expression.
xfun::split_source(c("if (TRUE) {", "1 + 1", "}", "print(1:5)"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.