clip: Export an r object to the clipboard while converting the...

clipR Documentation

Export an r object to the clipboard while converting the slashes

Description

fclip put x in the clipboard with forward slashes. bclip put x in the clipboard with backward slashes.

These are designed to allow you to export a path used in R to the clipboard. I suspect bclip() to be more useful, and example would be after exporting a file you could then call bclip() on the same path to subsequently paste that path in another windows application. In my case this is often GIS data that I want to load into an interactive GIS application.

Usage

bclip(x)

fclip(x)

Arguments

x

A character string of a path to be exported

Examples

f <- tempfile(fileext = ".png")
## Not run: 
png(f)
plot(1, 1)
dev.off()

## End(Not run)
bclip(f)  # back slash version of the file path is now in the clipboard


ethanplunkett/slasher documentation built on Sept. 27, 2022, 3:37 p.m.