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

夙愿已清 提交于 2021-02-10 19:40:21

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/53784766/how-to-add-css-external-files-to-be-used-by-my-r-package-function

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!