R Under development (unstable) (2025-12-16 r89184 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > message("*** devList() ...") *** devList() ... > > library("R.devices") R.devices v2.17.3 successfully loaded. See ?R.devices for help. > > res <- devList() > print(res) named integer(0) > stopifnot(is.integer(res)) > stopifnot(is.character(names(res))) > > res <- devList(dropNull=FALSE) > print(res) Device 1 1 > stopifnot(is.integer(res)) > stopifnot(is.character(names(res))) > > res <- devList(interactiveOnly=TRUE) > print(res) named integer(0) > stopifnot(is.integer(res)) > stopifnot(is.character(names(res))) > > # - - - - - - - - - - - - - - - - - - - - - - - - - > # Labels > # - - - - - - - - - - - - - - - - - - - - - - - - - > devSetLabel(which=1L, label="foo") > label <- devGetLabel(1L) > print(label) [1] "foo" > stopifnot(label == "foo") > label <- devGetLabel("foo") > print(label) [1] "foo" > stopifnot(label == "foo") > > devSetLabel(which=1L, label="bar") > label <- devGetLabel(1L) > print(label) [1] "bar" > stopifnot(label == "bar") > label <- devGetLabel("bar") > print(label) [1] "bar" > stopifnot(label == "bar") > > devSetLabel(which="bar", label="foo") > label <- devGetLabel(1L) > print(label) [1] "foo" > stopifnot(label == "foo") > label <- devGetLabel("foo") > print(label) [1] "foo" > stopifnot(label == "foo") > > > res <- try(devGetLabel(which=10L)) Error in devGetLabel(which = 10L) : Cannot get device label. No such device: '10' (known devices: 'foo') > stopifnot(inherits(res, "try-error")) > > message("*** devList() ... DONE") *** devList() ... DONE > > > proc.time() user system elapsed 0.48 0.07 0.48