File: rcompile.R

package info (click to toggle)
r-cran-r.rsp 0.45.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,568 kB
  • sloc: javascript: 612; tcl: 304; sh: 18; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library("R.rsp")
library("R.utils") # Arguments

verbose <- Arguments$getVerbose(TRUE)

path <- system.file(package="R.rsp")
path <- file.path(path, "rsp_tests")

pathname <- file.path(path, "trimming-1.txt.rsp")

verbose && enter(verbose, "rcompile()")

untils <- rev(eval(formals(R.rsp:::parseDocument.RspParser)$until))
untils <- setdiff(untils, "*")

for (kk in seq_along(untils)) {
  until <- untils[kk]
  verbose && enter(verbose, sprintf("Until #%d ('%s') of %d", kk, until, length(untils)))
  s <- rcompile(file=pathname, until=until, output=RspString(), verbose = TRUE)
  verbose && ruler(verbose)
  cat(s)
  verbose && ruler(verbose)
  verbose && exit(verbose)
}

verbose && exit(verbose)