Open fedenolasco opened 6 years ago
The pdf file in question is located in repo : "C:\Users\nolascofx\Documents\repo\example_repo/kq/9g/6d/kq9g6dj0i0dor65iymejezwq" Usually I call shell.exec as in above function openPDF to open the default pdf editor based on file extension. Here I guess the function rp$sys takes care of normalizing the path and opening the file with specified pdfviewer. I am not familiar with rp$sys process. Did youy test this in Windows OS?
Hi Fede,
The sys
command is a simple shortcut to the system command of R: it just calls it passing your command and the position of the file on the disk. Here "evince" is not a function, but a shell command. If you pass "SumatraPDF.exe", it should be correctly used to open the file (if the command is in the system search path).
If you want a more complex management of the file types, than you could write an executable script (for example a .bat
file) implementing your openPDF
and then pass it to sys
.
Hope that helps.
Brilliant package which I am trying to use in Window 7 environment. Code sample round the issue based on your package documentation, it's about the rp$sys function
R version is: Windows 7 platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.3
year 2017
month 11
day 30
svn rev 73796
language R
version.string R version 3.4.3 (2017-11-30) nickname Kite-Eating Tree
Repo package is: repo 2.1.2
Rstudio is: 1.1.414
PDF Preview in RStudio is I want to use "Sumatra" pdf which is pre-configured in RStudio and available on path C:/Program Files/RStudio/bin/sumatra/SumatraPDF.exe
ISSUE How do I manage to change "evince" Linux-based PDF to "sumatra"?
Opening the stored PDF with Evince document viewer
rp$sys("afigure.pdf", "evince")
Thank you, Fede