Reputation: 51
I am writing my first package in R, and am hoping to initially have it available on my Github and eventually submit to CRAN and/or Bioconductor. Here is the link to my package on github: https://github.com/octaviamd/interactmapper The main features of my package are these interactive plots that you can generate using my package, and I was hoping to include some of these as examples of what the package can do in my README file, but unfortunately it seems that github documents don't allow interactive elements. Is there a workaround for this so I can successfully demonstrate how my package works in the README file?
I tried running the following command in the github_document README.Rmd that I generated via usethis::use_readme_rmd()
devtools::install_github("octaviamd/interactmapper")
library(interactmapper)
interactmapper::interact_qual(iris[,1:4], iris$Species, "UMAP")
But when I try to knit the Rmarkdown document, I get the following error message:
Error: Functions that produce HTML output found in document targeting gfm-ascii_identifiers output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:
always_allow_html: yes
Note however that the HTML output will not be visible in non-HTML formats.
Execution halted
I don't know if it is preferable to keep the README file as a github_document for ease of display on github or whether me switching to html will make it not work at all or will affect my submission to CRAN/Bioconductor. I tried to add the always_allow_html: yes
line to the YAML, but then, as the error message states, when knitting, it makes the document, but without my plots at all.
How can I successfully show my interactive plots in my README file on github? If you have previous experience with this or have ideas on how to do this, I'd really appreciate your input! Thank you in advance!!
Upvotes: 5
Views: 879