Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offer xls for static download #333

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: metacheck
Title: Crossref Metadata Compliance
Version: 0.3.0
Version: 0.3.2.9000
Authors@R:
c(
person(
@@ -85,7 +85,8 @@ Imports:
bslib,
curl,
crlite,
lobstr
lobstr,
downloadthis
Suggests:
testthat,
subugoetheme,
17 changes: 13 additions & 4 deletions R/email.R
Original file line number Diff line number Diff line change
@@ -407,16 +407,25 @@ md_data_attachment <- function(dois,
dois[is_metacheckable(dois)]
)),
path = fs::file_temp(ext = "xlsx")) {
df <- md_data_attachment_df(dois, df)
writexl::write_xlsx(
x = df,
path = path
)
}

#' @describeIn md_data_attachment Generate DF
md_data_attachment_df <- function(dois,
df = cr_compliance_overview(get_cr_md(
dois[is_metacheckable(dois)]
))) {
is_compliance_overview_list(df)
df[["pretest"]] <- tibble::tibble(
# writexl does not know vctrs records
doi = as.character(biblids::as_doi(dois)),
tabulate_metacheckable(dois)
)
writexl::write_xlsx(
x = df,
path = path
)
df
}

#' Data is available
Binary file added inst/mc_individual_results.xlsx
Binary file not shown.
17 changes: 17 additions & 0 deletions vignettes/report.Rmd
Original file line number Diff line number Diff line change
@@ -43,4 +43,21 @@ This is an example report using the `metacheck::doi_examples` data, shipped with
</div>
</div>

## Individual Results

`r metacheck::mc_long_docs_string("table.md", lang = "en")`

```{r, echo = FALSE}
downloadthis::download_file(
path = system.file("mc_individual_results.xlsx", package = "metacheck"),
output_name = "Individual Results as an Excel Spreadsheet",
button_label = "Individual Results as an Excel Spreadsheet",
button_type = "danger",
has_icon = TRUE,
icon = "fa fa-save",
self_contained = FALSE
)
```


## References