toniiiio / imageclipr Goto Github PK
View Code? Open in Web Editor NEWRStudio Addin: Copy Image from Clipboard into RMarkdown .Rmd file
License: Other
RStudio Addin: Copy Image from Clipboard into RMarkdown .Rmd file
License: Other
STR:
Result: images files are at the same directory with the rmd file
Expectation: it seems untidy when a lot of images are pasted. They should be put into the /img/ subdirectory, or an option can be offered in the shinyr configuration interface.
Hi,
I think this is a great idea, was really excited to find that it exists. However, it doesn't seem to work for me. Perhaps I have installed it incorrectly.
I used:
packages.install('devtools')
devtools::install_github('Timag/imageclipr')
This didn't work at all - threw an error message complaining that PIL wasn't installed. So from Terminal I ran 'sudo pip install pillow'.
Now when I run 'devtools::install_github('Timag/imageclipr')' it installs without error but when I try to paste something in I get this error:
MacBook Pro 2018 running OS X Mojave 10.14.6
RStudio 1.1.456
I have Python installed, I think, on this machine but I have never used it. This may be the issue - I have no idea whether it's working, whether all the paths are correct etc.
Any suggestions?
Hi!
I am on Debian 11. The same bug appears on XFCE and Cinnamon Desktop Environment. I installed the extension following the instructions, including installing the xclip package in linux. However, when I execute the paste image addin command, I get the following error message:
Error in save_clipboard_image(img_file_name, dir = dirname(file_path)) : Clipboard data is not an image.
I have looked around and I am suspecting the native clipboard to somehow interfere with xclip ability to handle the image once I copy it to the clipboard.
Maxime
Hello, I've tried devtools::install_github('Timag/imageclipr') and got this error:
Error : (converted from warning) unable to re-encode 'insertImageCode.R' line 26
I've analyzed the line
write (the clipboard as «class PNGf») to theFile
It seems the «» is the culpable. I forked and removed them, and it installed fine.
Hey, I used to have no issues with imageclipr but I switched to a macbook with an m2 chip. Now when I try to paste an image, I get this error.
Any help would be appreciated since I really like using this addin!
After either selecting from the addin menu or calling the function imageclipr::config()
in the viewer the shiny
applet opens to change the configuration.
However the changes seem not to persist.
E.g., I just changed the Plot title to (New .
and pressed done (screenshot below)
However when I tried it out it still displayed the default Plot title.
from the old config. Which also checks with when I open the config applet as well.
I run R Version 4.2.1 on Windows.
Thanks for making this package!
I was able to follow all instructions, but once the code is pasted into R the image does now show up. Any ideas?
Hi,
Thanks for the great idea.
My understanding was that you don't need to save the image but can only have it in the clipboard but I get the following error:
Error in (function () : Please save the file before pasting an image.
Basically I installed the packages, assigned a keyboard shortcut to the InsertImage
Addin, copied a photo from a web browser, and tried to paste it in an Rmarkdown file.
I'd appreciate any help.
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base
other attached packages:
[1] magrittr_1.5
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 RSpectra_0.16-0
[3] plyr_1.8.6 compiler_3.6.3
[5] pillar_1.4.3 BiocManager_1.30.10
[7] RColorBrewer_1.1-2 tools_3.6.3
[9] digest_0.6.25 packrat_0.5.0
[11] evaluate_0.14 lifecycle_0.2.0
[13] tibble_2.1.3 gtable_0.3.0
[15] lattice_0.20-40 pkgconfig_2.0.3
[17] rlang_0.4.5 Matrix_1.2-18
[19] igraph_1.2.4.2 rstudioapi_0.11
[21] microbenchmark_1.4-7 yaml_2.2.1
[23] parallel_3.6.3 xfun_0.12
[25] gridExtra_2.3 stringr_1.4.0
[27] dplyr_0.8.5 knitr_1.28
[29] vctrs_0.2.4 grid_3.6.3
[31] tidyselect_1.0.0 data.table_1.12.8
[33] glue_1.3.1 ellipse_0.4.1
[35] R6_2.4.1 rARPACK_0.11-0
[37] rmarkdown_2.1 reshape2_1.4.3
[39] ggplot2_3.3.0 purrr_0.3.3
[41] tidyr_1.0.2 corpcor_1.6.9
[43] scales_1.1.0 mixOmics_6.10.8
[45] nipals_0.7 htmltools_0.4.0
[47] matrixStats_0.55.0 MASS_7.3-51.5
[49] assertthat_0.2.1 colorspace_1.4-1
[51] stringi_1.4.6 munsell_0.5.0
[53] crayon_1.3.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.