akelopes
akelopes

Reputation: 539

How to add CSS external files to be used by my R package function?

I'm making a personal package and would like to load a css file in one of the functions in this package in order to have a "default style". What is the optimal way of doing this?

I cannot find any documnetation that helps me understand how to work with external data like a css file, mostly what I find is about exporting external datasets to be loaded separately, etc.

Upvotes: 3

Views: 1108

Answers (1)

akelopes
akelopes

Reputation: 539

I found the problem. I was using the inst/extdata folder to export my style.css file, but was trying to read it directly in the code. Thanks to @MrFlick docpage, I found out I had to use the system.file() function in order to use the exported file.

Upvotes: 1

Related Questions