clipr (version 0.5.0)

clipr_available: Is the system clipboard available?

Description

Checks to see if the system clipboard is write-able/read-able. This may be useful if you are developing a package that relies on clipr and need to ensure that it will skip tests on machines (e.g. CRAN, Travis) where the system clipboard may not be available.

Usage

clipr_available(...)

dr_clipr(...)

Arguments

Pass other options to write_clip. Generally only used to pass the argument allow_non_interactive_use = TRUE.

Value

clipr_available returns a boolean value.

dr_clipr prints an informative message to the console with software and system configuration requirements if clipr is not available (invisibly returns the same string)

Details

If you are trying to call this in a non-interactive session, be sure to call using clipr_available(allow_non_interactive = TRUE), or by setting the environemnt variable CLIPBOARD_AVAILABLE=TRUE

Examples

Run this code
# NOT RUN {
# When using testthat:
library(testthat)
skip_if_not(clipr_available())
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab