tests/devListIndexOf.R

message("*** devListIndexOf() ...")

library("R.devices")

.devListIndexOf <- R.devices:::.devListIndexOf

labels <- list(character(0L), "Device 1", c("Device 1", "Device 1"), c("Device 1", "FooBar"))
for (label in labels) {
  res <- .devListIndexOf(label, error=FALSE)
  print(res)
  stopifnot(is.integer(res))
  stopifnot(is.character(names(res)))
}

message("*** devListIndexOf() ... DONE")

Try the R.devices package in your browser

Any scripts or data that you put into this service are public.

R.devices documentation built on Oct. 30, 2019, 10:58 a.m.