Skip to content

Commit

Permalink
fix error with export
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyBarthelemy committed Oct 10, 2024
1 parent 4de04bb commit f280e77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
^\.github$

^README\.Rmd$
^README\.html$
^README-.*\.png$

^Meta$
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: JDCruncheR
Type: Package
Title: Interface Between the 'JDemetra+' Cruncher and R, and Quality Report Generator
Version: 0.3.0.9000
Version: 0.3.1
Authors@R: c(
person(given = "Tanguy",
family = "Barthelemy", role = c("aut", "cre", "art"),
Expand Down
20 changes: 6 additions & 14 deletions R/QR_export.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ export_xlsx.QR_matrix <- function(x,
wb = wb_qr,
sheet = "Modalities",
x = x$modalities,
headerStyle = ifelse(test = auto_format, yes = header_style, no = NULL)
headerStyle = if (auto_format) header_style else NULL
)
openxlsx::writeData(
wb = wb_qr,
sheet = "Values",
x = x$values,
headerStyle = ifelse(test = auto_format, yes = header_style, no = NULL)
headerStyle = if (auto_format) header_style else NULL
)

if (auto_format) {
Expand Down Expand Up @@ -382,17 +382,13 @@ export_xlsx.mQR_matrix <- function(
wb = wb_modalities,
sheet = name,
x = qr$modalities,
headerStyle = ifelse(test = auto_format,
yes = header_style,
no = NULL)
headerStyle = if (auto_format) header_style else NULL
)
openxlsx::writeData(
wb = wb_values,
sheet = name,
x = qr$values,
headerStyle = ifelse(test = auto_format,
yes = header_style,
no = NULL)
headerStyle = if (auto_format) header_style else NULL
)
if (auto_format) {
wb_modalities <- apply_BQ_style(wb = wb_modalities, x = qr,
Expand Down Expand Up @@ -440,17 +436,13 @@ export_xlsx.mQR_matrix <- function(
wb = wb_mqr,
sheet = paste0(name, "_modalities"),
x = qr$modalities,
headerStyle = ifelse(test = auto_format,
yes = header_style,
no = NULL)
headerStyle = if (auto_format) header_style else NULL
)
openxlsx::writeData(
wb = wb_mqr,
sheet = paste0(name, "_values"),
x = qr$values,
headerStyle = ifelse(test = auto_format,
yes = header_style,
no = NULL)
headerStyle = if (auto_format) header_style else NULL
)
if (auto_format) {
wb_mqr <- apply_BQ_style(wb = wb_mqr, x = qr,
Expand Down

0 comments on commit f280e77

Please sign in to comment.