0

I have an output consisting of file paths but I'd like to be able to click on them and have my file explorer open

For instance, this text is in a document C:/Users/lauren/Documents/logs/

But it exists as plain text, not as a link to the folder. How would I encode a link into the output I'm writing? Any output is fine but I chose excel initially to have a column of filepaths.

  • What kind of "output" is this exactly? The R terminal doesn't support HTML/hyperlinks. – MrFlick Apr 20 '22 at 23:12
  • It is an excel sheet of filepaths where each row has a separate absolute filepath. With xslx addHyperlink I've been able to convert URLs as I'd like but I'm still unable to convert filepaths the same – Lauren Kenyon Apr 20 '22 at 23:16
  • 1
    Typically if you want to make like to a local file, you use `file://` rather than `http://`. So try using that before that path. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. It wasn't clear at all that excel was involved here. – MrFlick Apr 20 '22 at 23:18
  • It's hard to show desired output when it's a hyperlink. Writing file://C:/Users/lauren/Documents/logs/ to a csv semi-works but now you have to click multiple times in order to get the text to convert into link form. Maybe I'll try processing my output in a different language that supports hyperlinks. – Lauren Kenyon Apr 20 '22 at 23:50

0 Answers0