knitxl
converts an Rmarkdown file into an .xlsx
file. It uses
knitr
to parse the Rmd files and evaluate code
chunks. knitx
comes with features to customize the output .xlsx
file.
This will convert an .Rmd
file into an .xlsx
file:
library(knitxl)
path_to_rmd_file <- system.file("examples/minimal-example.Rmd", package = "knitxl")
knitxl(path_to_rmd_file)
Most users should install the latest release version of knitxl
from
CRAN with:
install.packages("knitxl")
You can install the development version of knitxl from GitHub with:
# install.packages("devtools")
devtools::install_github("dreanod/knitxl")
knitxl
worksknitxl
relies on knitr
to parse an .Rmd
file
and evaluate the code chunks. knitxl
attaches special
hooks to knitr
, which will save the
text, source code, and results of knitr
evaluation to an R6
object that
represents the content of an .xlsx
file.
openxlsx
is used for creating,
writing, styling and saving this object to the .xlsx
output.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.