knitr::opts_chunk$set(echo = TRUE)
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(CausalityExtraction) library(dplyr)
path_file_single <- "./../inst/extdata/sample_documents/jv04amj.pdf" path_folder <- "./../inst/extdata/sample_documents/" path_file_mult <- list.files( recursive = FALSE, path = path_folder, pattern = ".pdf", full.names = TRUE )
df_1 <- CausalityExtraction( file_path = path_file_single ) df_1 %>% glimpse()
df_2 <- CausalityExtraction( file_path = path_file_mult ) df_2 %>% glimpse()
df_3 <- CausalityExtraction( folder_path = path_folder ) df_3 %>% glimpse()
file_path <- c("/tmp/RtmpNFkBjP/ad5c78055376a890447a77d9/0.pdf", "/tmp/RtmpNFkBjP/ad5c78055376a890447a77d9/1.pdf") regex_file_name <- "([^/]+$)" df <- data.frame(file_path) df %>% dplyr::mutate( file_name = stringr::str_extract(x, regex_file_name) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.