Skip to contents

[Experimental]

Reports what percentage of commands in a .do file (or directory of files) can be automatically transpiled vs require manual review.

Usage

transpile_coverage(path, recursive = TRUE)

Arguments

path

Path to a .do file or directory of .do files

recursive

If TRUE and path is a directory, search subdirectories

Value

A data.frame with columns: file, total_commands, translated, skipped, manual_review, coverage_pct

Examples

# \donttest{
tf <- tempfile(fileext = ".do")
writeLines(c("gen x = 1", "replace x = 2 if y == 3", "drop z"), tf)
transpile_coverage(tf)
#>                  file                                path total_commands
#> 1 file26a21a9d7cf0.do /tmp/RtmpkNIXgg/file26a21a9d7cf0.do              2
#> 2               TOTAL /tmp/RtmpkNIXgg/file26a21a9d7cf0.do              2
#>   translated skipped manual_review coverage_pct
#> 1          2       0             0          100
#> 2          2       0             0          100
# }