Reputation: 539
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
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