Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write files to clipboard? #32

Closed
rorynolan opened this issue Jun 8, 2018 · 1 comment
Closed

Write files to clipboard? #32

rorynolan opened this issue Jun 8, 2018 · 1 comment

Comments

@rorynolan
Copy link

rorynolan commented Jun 8, 2018

I'd like to be able to write files to clipboard, like what happens if you right click on a file and click copy. Perhaps there could be a function clipr::write_clip_file() or something like that where you pass the path to the file as an argument?
Loving the package, thanks for your great work.
Rory

@mdlincoln
Copy link
Owner

Thanks very much for the suggestion. I'm glad to hear you are finding the package useful.

I don't think a function to do this fits in the scope of clipr. This package is designed to get objects out of R onto the clipboard, and clipboard contents out of the clipboard and into R objects.

Clipr would need to make a lot of assumptions about the contents of an arbitrary file on your computer to decide how to read it into an R object before writing it back out again. I think you are going to be better served by reading the file in using a function that you know will fit your specific case (readLines, read.csv, hey, maybe it's a JPEG file and you want to read it into a numeric matrix with jpeg::readJPEG!) and then write it out with clipr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants