# prg1.R

Execution end time

2025-12-01T14:03:09 Central European Standard Time

Path to script

/Users/oath/Projects/whirl/inst/examples/prg1.R

# Summary

Tipsuccess

# Script

Setup

    library(dplyr)

    Attaching package: ‘dplyr’

    The following objects are masked from ‘package:stats’:

        filter, lag

    The following objects are masked from ‘package:base’:

        intersect, setdiff, setequal, union

    library(ggplot2)

Prepare data

    x <- mtcars |>
      as_tibble(rownames = "car")

    print(x)

    # A tibble: 32 × 12
       car                 mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
       <chr>             <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
     1 Mazda RX4          21       6  160    110  3.9   2.62  16.5     0     1     4     4
     2 Mazda RX4 Wag      21       6  160    110  3.9   2.88  17.0     0     1     4     4
     3 Datsun 710         22.8     4  108     93  3.85  2.32  18.6     1     1     4     1
     4 Hornet 4 Drive     21.4     6  258    110  3.08  3.22  19.4     1     0     3     1
     5 Hornet Sportabout  18.7     8  360    175  3.15  3.44  17.0     0     0     3     2
     6 Valiant            18.1     6  225    105  2.76  3.46  20.2     1     0     3     1
     7 Duster 360         14.3     8  360    245  3.21  3.57  15.8     0     0     3     4
     8 Merc 240D          24.4     4  147.    62  3.69  3.19  20       1     0     4     2
     9 Merc 230           22.8     4  141.    95  3.92  3.15  22.9     1     0     4     2
    10 Merc 280           19.2     6  168.   123  3.92  3.44  18.3     1     0     4     4
    # ℹ 22 more rows

Create and save plot

    ggplot(data = x) +
      geom_point(mapping = aes(x = mpg, y = hp, size = wt, colour = as.factor(am)))

    ggsave("plot1.png")

    Saving 7 x 5 in image

# Session info

NotePlatform

Setting | Value
--- | ---
version | R version 4.5.2 (2025-10-31)
os | macOS Tahoe 26.1
system | aarch64, darwin20
ui | X11
language | (EN)
collate | C.UTF-8
ctype | C.UTF-8
tz | Europe/Copenhagen
date | 2025-12-01
pandoc | 3.8.1 @ /opt/homebrew/bin/ (via rmarkdown)
quarto | 1.8.25 @ /Applications/quarto/bin/quarto

NoteR packages used directly

Package | Version | Source
--- | --- | ---
dplyr | 1.1.4 | CRAN (R 4.5.0)
ggplot2 | 3.5.2 | CRAN (R 4.5.0)
knitr | 1.50 | CRAN (R 4.5.0)
rmarkdown | 2.29 | CRAN (R 4.5.0)
sessioninfo | 1.2.3 | CRAN (R 4.5.0)

NoteR packages used indirectly

Package | Version | Source
--- | --- | ---
cli | 3.6.5 | CRAN (R 4.5.0)
digest | 0.6.37 | CRAN (R 4.5.0)
evaluate | 1.0.4 | CRAN (R 4.5.0)
farver | 2.1.2 | CRAN (R 4.5.0)
fastmap | 1.2.0 | CRAN (R 4.5.0)
generics | 0.1.4 | CRAN (R 4.5.0)
glue | 1.8.0 | CRAN (R 4.5.0)
gtable | 0.3.6 | CRAN (R 4.5.0)
htmltools | 0.5.8.1 | CRAN (R 4.5.0)
jsonlite | 2.0.0 | CRAN (R 4.5.0)
labeling | 0.4.3 | CRAN (R 4.5.0)
lattice | 0.22-7 | CRAN (R 4.5.2)
lifecycle | 1.0.4 | CRAN (R 4.5.0)
magrittr | 2.0.3 | CRAN (R 4.5.0)
Matrix | 1.7-4 | CRAN (R 4.5.2)
pillar | 1.11.0 | CRAN (R 4.5.0)
pkgconfig | 2.0.3 | CRAN (R 4.5.0)
png | 0.1-8 | CRAN (R 4.5.0)
R6 | 2.6.1 | CRAN (R 4.5.0)
ragg | 1.4.0 | CRAN (R 4.5.0)
RColorBrewer | 1.1-3 | CRAN (R 4.5.0)
Rcpp | 1.1.0 | CRAN (R 4.5.0)
reticulate | 1.43.0 | CRAN (R 4.5.0)
rlang | 1.1.6 | CRAN (R 4.5.0)
scales | 1.4.0 | CRAN (R 4.5.0)
systemfonts | 1.2.3 | CRAN (R 4.5.0)
textshaping | 1.0.1 | CRAN (R 4.5.0)
tibble | 3.3.0 | CRAN (R 4.5.0)
tidyselect | 1.2.1 | CRAN (R 4.5.0)
utf8 | 1.2.6 | CRAN (R 4.5.0)
vctrs | 0.6.5 | CRAN (R 4.5.0)
withr | 3.0.2 | CRAN (R 4.5.0)
xfun | 0.52 | CRAN (R 4.5.0)
yaml | 2.3.10 | CRAN (R 4.5.0)

NoteEnvironment variables

Variable | Value
--- | ---
__CF_USER_TEXT_ENCODING | 0x1F6:0x0:0x0
__CFBundleIdentifier | co.posit.positron
_R_CHECK_SYSTEM_CLOCK_ | 0
ANTHROPIC_BASE_URL | https://api.marketplace.novo-genai.com
ANTHROPIC_MODEL | anthropic_claude_sonnet_4_v1_0
ANTHROPIC_SMALL_FAST_MODEL | openai_gpt41_mini
CALLR_IS_RUNNING | true
COLORTERM | truecolor
COMMAND_MODE | unix2003
DATABRICKS_CATALOG_NAME | amace_cdr_bronze_dev
DATABRICKS_HOST | https://adb-273240340063409.9.azuredatabricks.net
DATABRICKS_SCHEMA_NAME | vlob_test
DATABRICKS_VOLUME | /Volumes/amace_cdr_bronze_dev/vlob_test
DENO_DOM_PLUGIN | /Applications/quarto/bin/tools/aarch64/deno_dom/libplugin.dylib
DENO_NO_UPDATE_CHECK | 1
DENO_TLS_CA_STORE | system,mozilla
DISABLE_TELEMETRY | 1
EDITOR | vi
GIT_ASKPASS | /Applications/Positron.app/Contents/Resources/app/extensions/git/dist/askpass.sh
HOME | /Users/oath
HOMEBREW_CELLAR | /opt/homebrew/Cellar
HOMEBREW_PREFIX | /opt/homebrew
HOMEBREW_REPOSITORY | /opt/homebrew
INFOPATH | /opt/homebrew/share/info:/opt/homebrew/share/info:
LANG | C.UTF-8
LN_S | ln -s
LOGNAME | oath
MAKE | make
MallocNanoZone | 0
NODE_EXTRA_CA_CERTS | /users/oath/do_not_delete/Zscaler.pem
OPENAI_BASE_URL | https://api.marketplace.novo-genai.com/v1
ORIGINAL_XDG_CURRENT_DESKTOP | undefined
OSLogRateLimit | 64
PAGER | /usr/bin/less

PATH

/Applications/quarto/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Library/TeX/texbin:/Applications/quarto/bin:/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/deactivate/zsh:/Users/oath/.virtualenvs/r-reticulate/bin:/opt/homebrew/opt/icu4c@77/sbin:/opt/homebrew/opt/icu4c@77/bin:/Users/oath/.local/bin:/Users/oath/.positron/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/scripts/noConfigScripts:/Users/oath/.local/bin:/Users/oath/.positron/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/scripts/noConfigScripts:/Users/oath/Library/Application Support/Positron/User/globalStorage/github.copilot-chat/debugCommand

POSITRON | 1
POSITRON_LONG_VERSION | 2025.11.0+234
POSITRON_MODE | desktop
POSITRON_VERSION | 2025.11.0
PROCESSX_PScdd812ba79d7_1764594186 | YES
PROCESSX_PSd55042081ef0_1764594187 | YES
PWD | /private/var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/RtmpuZdoHo/filecdd810951bdc
PYDEVD_DISABLE_FILE_VALIDATION | 1
PYTHONIOENCODING | utf-8
PYTHONPYCACHEPREFIX | /Users/oath/Library/Application Support/Positron/User/globalStorage/ms-python.python/pycache
PYTHONUNBUFFERED | 1
QUARTO_DENO | /Applications/quarto/bin/tools/aarch64/deno
QUARTO_DOCUMENT_FILE | dummy.qmd
QUARTO_EXECUTE_INFO | /private/var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/RtmpuZdoHo/filecdd810951bdc/.quarto/quarto-session-temp5a3b6fa9b6343825/955db1a16a5e1fda
QUARTO_PROFILE |
QUARTO_PROJECT_DIR | /private/var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/RtmpuZdoHo/filecdd810951bdc
QUARTO_PROJECT_ROOT | /private/var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/RtmpuZdoHo/filecdd810951bdc
QUARTO_R | /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/bin
QUARTO_ROOT | /
R_ARCH |
R_BROWSER | /usr/bin/open
R_BZIPCMD | /usr/bin/bzip2
R_DOC_DIR | /Library/Frameworks/R.framework/Resources/doc
R_GZIPCMD | /usr/bin/gzip
R_HOME | /Library/Frameworks/R.framework/Resources
R_INCLUDE_DIR | /Library/Frameworks/R.framework/Resources/include
R_LIBS_SITE | /Library/Frameworks/R.framework/Resources/site-library
R_LIBS_USER | /Users/oath/Library/R/arm64/4.5/library
R_PAPERSIZE | a4
R_PAPERSIZE_USER | a4
R_PDFVIEWER | /usr/bin/open
R_PLATFORM | aarch64-apple-darwin20
R_PRINTCMD | lpr
R_QPDF | /Library/Frameworks/R.framework/Resources/bin/qpdf
R_RD4PDF | times,inconsolata,hyper
R_REMOTES_UPGRADE | never
R_SESSION_TMPDIR | /var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T//Rtmp4j4PWV
R_SHARE_DIR | /Library/Frameworks/R.framework/Resources/share
R_STRIP_SHARED_LIB | strip -x
R_STRIP_STATIC_LIB | strip -S
R_TEXI2DVICMD | /opt/R/arm64/bin/texi2dvi
R_UNZIPCMD | /usr/bin/unzip
R_ZIPCMD | /usr/bin/zip
RENV_CONFIG_PAK_ENABLED | TRUE
RSTUDIO_PANDOC | /Applications/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64
RUST_BACKTRACE | 1
RUST_LOG | warn,ark=warn
SED | /usr/bin/sed
SF_PARTNER | posit_positron
SHELL | /bin/zsh
SHLVL | 2
SPARK_CONNECT_USER_AGENT | posit-positron
SSH_AUTH_SOCK | /private/tmp/com.apple.launchd.k1juAaFMHD/Listeners
TAR | /usr/bin/tar
TERM | dumb
TERM_PROGRAM | vscode
TERM_PROGRAM_VERSION | 1.105.0
TMPDIR | /var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/
USER | oath
VIRTUAL_ENV | /Users/oath/.virtualenvs/r-reticulate
VIRTUAL_ENV_PROMPT | r-reticulate
VSCODE_DEBUGPY_ADAPTER_ENDPOINTS | /Users/oath/.positron/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/.noConfigDebugAdapterEndpoints/endpoint-9f8306bd783e70dd.txt
VSCODE_ENV_PREPEND | PATH=/Applications/Positron.app/Contents/Resources/app/extensions/positron-python/python_files/deactivate/zsh\x3a/Users/oath/.virtualenvs/r-reticulate/bin\x3a:PS1=r-reticulate
VSCODE_ENV_REPLACE | PYTHONPYCACHEPREFIX=/Users/oath/Library/Application Support/Positron/User/globalStorage/ms-python.python/pycache:PYTHONUNBUFFERED=1:PYTHONIOENCODING=utf-8:VIRTUAL_ENV=/Users/oath/.virtualenvs/r-reticulate:VIRTUAL_ENV_PROMPT=r-reticulate
VSCODE_GIT_ASKPASS_EXTRA_ARGS |
VSCODE_GIT_ASKPASS_MAIN | /Applications/Positron.app/Contents/Resources/app/extensions/git/dist/askpass-main.js
VSCODE_GIT_ASKPASS_NODE | /Applications/Positron.app/Contents/Frameworks/Positron Helper (Plugin).app/Contents/MacOS/Positron Helper (Plugin)
VSCODE_GIT_IPC_HANDLE | /var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T/vscode-git-913e34a768.sock
VSCODE_NONCE | 79c262a4-38d5-462c-a8c1-f576ee043aba
WHIRL_LOG_MSG | /var/folders/fx/71by3f551qzb5wkxt82cv15m0000gp/T//RtmpuZdoHo/filecdd810951bdc/log_msg.json
XPC_FLAGS | 0x0
XPC_SERVICE_NAME | 0

NoteOptions

Option | Value
--- | ---
add.smooth | TRUE
ambiguousMethodSelection | function (cond) , NULL
askpass | function (prompt) , {, .ps.ui.askForPassword(prompt), }
bitmapType | quartz
browser | function (url) , {, .ps.Call("ps_browse_url", as.character(url)), }
browserNLdisabled | FALSE
callr.condition_handler_cli_message | function (msg) , {, custom_handler <- getOption("cli.default_handler"), if (is.function(custom_handler)) {, custom_handler(msg), }, else {, cli_server_default(msg), }, }
catch.script.errors | FALSE
CBoundsCheck | FALSE
check.bounds | FALSE
citation.bibtex.max | 1
cli.default_num_colors | 256
cli.dynamic | TRUE
cli.hyperlink | TRUE
cli.hyperlink_help | TRUE
cli.hyperlink_run | TRUE
cli.hyperlink_vignette | TRUE

connectionObserver

function (type, host, displayName, icon = NULL, connectCode, , disconnect, listObjectTypes, listObjects, listColumns, previewObject, , connectionObject, actions = NULL) , {, for (id in ls(envir = connections)) {, con <- get(id, envir = connections), if (identical(con$host, host) && identical(con$type, , type)) {, return(invisible(id)), }, }, id <- .ps.connection_opened(displayName, host, type, connectCode), connections[[id]] <- list(type = type, host = host, displayName = displayName, , icon = icon, connectCode = connectCode, disconnect = disconnect, , listObjectTypes = listObjectTypes, listObjects = listObjects, , listColumns = listColumns, previewObject = previewObject, , connectionObject = connectionObject, actions = actions, , objectTypes = connection_flatten_object_types(listObjectTypes())), invisible(id), }, function (type, host) , {, for (id in names(connections)) {, con <- connections[[id]], if (con$host == host && con$type == type) {, .ps.connection_closed(id), rm(list = id, envir = connections), break, }, }, }, function (type, host, hint) , {, for (id in names(connections)) {, con <- connections[[id]], if (con$host == host && con$type == type) {, .ps.connection_updated(id), break, }, }, }, <environment: 0x110ef9fb0>

continue | +
contrasts | contr.treatment, contr.poly
defaultPackages | datasets , utils , grDevices, graphics , stats , methods
demo.ask | default
deparse.cutoff | 60
device | .ark.graphics.device
device.ask.default | FALSE
digits | 7
dplyr.show_progress | TRUE
dvipscmd | dvips
echo | TRUE
editor | function (file, title, ..., name = NULL) , {, handler_editor(file = file, title = title, ..., name = name), }
encoding | native.enc
example.ask | default
expressions | 5000
help_type | html
help.search.types | vignette, demo , help
help.try.all.packages | FALSE
htmltools.preserve.raw | TRUE
HTTPUserAgent | R (4.5.2 aarch64-apple-darwin20 aarch64 darwin20)
install.lock | FALSE
install.packages.compile.from.source | interactive
internet.info | 2
keep.parse.data | TRUE
keep.parse.data.pkgs | FALSE
keep.source | TRUE
keep.source.pkgs | FALSE
knitr.in.progress | TRUE
locatorBell | TRUE
mailer | mailto
matprod | default
max.contour.segments | 25000
max.print | 1000
menu.graphics | TRUE
na.action | na.omit
nwarnings | 50
OutDec | .
pager | /Library/Frameworks/R.framework/Resources/bin/pager
papersize | a4
PCRE_limit_recursion | NA
PCRE_study | FALSE
PCRE_use_JIT | TRUE
pdfviewer | /usr/bin/open
pkgType | both
plumber.docs.callback | function (url) , {, .ps.ui.showUrl(url), }
printcmd | lpr
prompt | >
repos | https://cran.rstudio.com/
rlang_trace_top_env | <environment: R_GlobalEnv>
scipen | 0
shiny.launch.browser | function (url) , {, .ps.ui.showUrl(url), }
show.coef.Pvalues | TRUE
show.error.messages | TRUE
show.signif.stars | TRUE
showErrorCalls | FALSE
showNCalls | 50
showWarnCalls | FALSE
str | no, 3, 4, 99, TRUE, function (x, ...) , format(x, trim = TRUE, drop0trailing = TRUE, ...)
str.dendrogram.last | `
texi2dvi | /opt/R/arm64/bin/texi2dvi
tikzMetricsDictionary | dummy-tikzDictionary
timeout | 60
try.outFile | 3
ts.eps | 1e-05
ts.S.compat | FALSE
unzip | /usr/bin/unzip
useFancyQuotes | TRUE
verbose | FALSE

viewer

function (url, height = NULL, ...) , {, if (!is_string(url)) {, stop("`url` must be a string."), }, height <- .ps.validate.viewer.height(height), if (is_http_url(url)) {, return(utils::browseURL(url, ...)), }, normalizedPath <- normalizePath(url, mustWork = FALSE), normalizedTempdir <- normalizePath(tempdir(), mustWork = FALSE), if (startsWith(normalizedPath, normalizedTempdir)) {, title <- .ps.viewer.title(normalizedPath), .ps.Call("ps_html_viewer", normalizedPath, title, height, , FALSE), }, else {, utils::browseURL(normalizedPath, ...), }, }

warn | 0
warning.length | 1000
warnPartialMatchArgs | FALSE
warnPartialMatchAttr | FALSE
warnPartialMatchDollar | FALSE
width | 214