How to "launch" a data file (eg jpeg) from R/Rstudio

I'm looking for a general-purpose launcher for Windows where you specify a file and it opens that file in Windows with the default associated program.
is there such a library in R?

Failing that any suggestions for just coping with the specific case of JPeg images?

Please try this (AI generated answer)

path <- "C:/Users/folder/pictureFolder/nameOfPicture.jpg"
shell.exec(path)

No package required !

1 Like

That works perfectly - thank you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.