getClipboardFormats(numeric = FALSE)
readClipboard(format = 1, raw = FALSE)
writeClipboard(str, format = 1)
getClipboardFormats
, a character or integer vector of
available formats, in numeric order. If non human-readable character
representation is known, the number is returned. For readClipboard
, a character vector by default, a raw vector
if raw
is TRUE
, or NULL
, if the format is
unavailable. For writeClipboard
an invisible logical indicating success or
failure.CF_TEXT | 1 | Text in the machine's locale |
CF_BITMAP | 2 | |
CF_METAFILEPICT | 3 | Metafile picture |
CF_SYLK | 4 | Symbolic link |
CF_DIF | 5 | Data Interchange Fornat |
CF_TIFF | 6 | Tagged-Image File Format |
CF_OEMTEXT | 7 | Text in the OEM codepage |
CF_DIB | 8 | Device-Independent Bitmap |
CF_PALETTE | 9 | |
CF_PENDATA | 10 | |
CF_RIFF | 11 | Audio data |
CF_WAVE | 12 | Audio data |
CF_UNICODETEXT | 13 | Text in Unicode (UCS-2) |
CF_ENHMETAFILE | 14 | Enhanced metafile |
CF_HDROP | 15 | Drag-and-drop data |
CF_LOCALE | 16 | Locale for the text on the clipboard |
CF_MAX | 17 | Shell-oriented formats |
raw = TRUE
to read binary
formats, raw = FALSE
(the default) for text formats. The
current codepage is used to convert text to Unicode text, and
information on that is contained in the CF_LOCALE
format.
(Take care if you are running R in a different locale from Windows.) The writeClipboard
function will write a character vector as
text or Unicode text with standard CR-LF line terminators. It will
copy a raw vector directly to the clipboard without any changes.file
which can be used to set up a connection to a clipboard.