Skip to content

Commit

Permalink
export xl: setnames skip absent
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Oct 13, 2020
1 parent a03b378 commit 7f36103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: flexpivot
Title: Easy Pivot Table
Version: 0.0.1
Version: 0.1.0
Authors@R:
c(person(given = "Victor",
family = "Perrier",
Expand Down
2 changes: 1 addition & 1 deletion R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export_xlsx <- function(x, output, label_value = "value", ...) {
stop("export_xlsx works only with pivot_table or pivot_format objects", call. = FALSE)
}
x <- unpivot(x)
setnames(x, "value", label_value)
setnames(x, "value", label_value, skip_absent = TRUE)
write_xlsx(x = x, path = output)
}

0 comments on commit 7f36103

Please sign in to comment.