Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbojan/clipboard
R package for portable writing/reading to/from system clipboard
https://github.com/mbojan/clipboard
Last synced: 27 days ago
JSON representation
R package for portable writing/reading to/from system clipboard
- Host: GitHub
- URL: https://github.com/mbojan/clipboard
- Owner: mbojan
- Created: 2012-05-04T23:37:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T17:11:32.000Z (over 2 years ago)
- Last Synced: 2023-03-23T22:14:01.181Z (over 1 year ago)
- Language: R
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `clipboard`: R package making copy-pasting easy
[![R-CMD-check](https://github.com/mbojan/clipboard/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mbojan/clipboard/actions/workflows/R-CMD-check.yaml)
[![cran version](http://www.r-pkg.org/badges/version/clipboard)](https://cran.r-project.org/package=clipboard)Package "clipboard" provide a portable way of interacting with system
clipboard. You can write content into a clipboard to be able to paste it into
some other application. For completeness, there are also functions for getting
content from the clipboard into R. The primary motivation for writing this
package was to be able to quickly copy a content of a R object, typically a
matrix or a data frame, to be able to paste it into a table in an Office
program (e.g. MSWord, LibreOffice Writer, Excel, Calc, and alike).## Dependencies
Functions in package "clipboard" try to use existing facilities, i.e.
connections, for writing into system clipboard as documented on
`help(connections)`. So far, functions for that purposes are available only on
some systems. For example, function `writeClipboard` is available only on
Windows. In package "clipboard" the type of the operating system is detected
and appropriate method for writing and reading into the clipboard is
automatically selected. In some cases the package has to rely on external
tools. They are mentioned below.Linux: `xclip`
## Installation
Use package "devtools" and `install_github`:
```r
library(devtools)
install_github("mbojan/clipboard")
```## Details
The main function is `cb` writes a textual representation of a single R object
into clipboard. The function is generic. Currently implemented methods cover
vectors, matrices, data frames, and tables. Users can write their own methods.
Additionally, functions `write_cb` and `read_cb` provide a low-level interface.The package is developed on Github at https://github.com/mbojan/clipboard. Please
use Github facilities for submitting bugs (issues).