sas_run_file: Execute SAS file

View source: R/run-file.R

sas_run_fileR Documentation

Execute SAS file

Description

Execute a SAS file and render html output or save output as html and log.

Usage

sas_run_file(input_path, output_path, overwrite = FALSE)

Arguments

input_path

string; Path of SAS file to run.

output_path

optional string; Path to save html output to (log file will be named the same).

overwrite

logical; Can output overwrite prior output?

Value

If output_path specified, htmlwidget. Else, no return value.

See Also

Other code execution functions: sas_run_selected(), sas_run_string()

Examples


sas_connect()

tempfile_sas_path <- tempfile(fileext = ".sas")
tempfile_html_path <- sub("\\.sas$", ".html", tempfile_sas_path)
tempfile_log_path <- sub("\\.sas$", ".log", tempfile_sas_path)
cat("PROC MEANS DATA = sashelp.cars;RUN;", file = tempfile_sas_path)
sas_run_file(tempfile_sas_path, tempfile_html_path)

# clean up
unlink(tempfile_sas_path)
unlink(tempfile_html_path)
unlink(tempfile_log_path)


sasquatch documentation built on Feb. 28, 2026, 1:07 a.m.