Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Silvers authored Feb 27, 2024
1 parent b8094a1 commit e008340
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ environment, :code:`sandbox`.
from pyrty.utils import run_capture
# Create a temporary R script or use an existing one
rscript_code = """# Keep stdout clean
rscript_code = \
"""# Keep stdout clean
options(warn=-1)
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(library(tidyverse))
Expand All @@ -293,7 +294,8 @@ environment, :code:`sandbox`.
# Create a dataframe and write to stdout
a <- 1:5
df <- tibble::tibble(a, b = a * 2, c = opt$c)
try(writeLines(readr::format_csv(df), stdout()), silent=TRUE)"""
try(writeLines(readr::format_csv(df), stdout()), silent=TRUE)
"""
with NamedTemporaryFile('w+') as rscript:
rscript_path = Path(rscript.name)
Expand Down

0 comments on commit e008340

Please sign in to comment.