Skip to content

Commit

Permalink
Release 1.5 (#977)
Browse files Browse the repository at this point in the history
* bump version

* revdepcheck run - No changes to commit

* [write] Do not transpose if x is a matrix or data.frame
  • Loading branch information
JanMarvin committed Mar 26, 2024
1 parent b06b871 commit 925bec2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: openxlsx2
Title: Read, Write and Edit 'xlsx' Files
Version: 1.4.0.9000
Version: 1.5
Language: en-US
Authors@R: c(
person("Jordan Mark", "Barbone", email = "jmbarbone@gmail.com", role = "aut", comment = c(ORCID = "0000-0001-9788-3628")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
@@ -1,4 +1,4 @@
# openxlsx2 (development version)
# openxlsx2 1.5

## New features

Expand Down
4 changes: 3 additions & 1 deletion R/write.R
Expand Up @@ -827,7 +827,9 @@ write_data_table <- function(
### Create data frame --------------------------------------------------------

transpose <- FALSE
if (length(dims[[1]]) > length(dims[[2]]))
# do not transpose if input is a matrix. assuming that the input
if (length(dims[[1]]) > length(dims[[2]]) &&
!inherits(x, "matrix") && !inherits(x, "data.frame"))
transpose <- TRUE

## special case - formula
Expand Down
26 changes: 13 additions & 13 deletions revdep/README.md
@@ -1,23 +1,23 @@
# Platform

|field |value |
|:--------|:----------------------------|
|version |R version 4.3.2 (2023-10-31) |
|os |Ubuntu 20.04.6 LTS |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |C.UTF-8 |
|ctype |C.UTF-8 |
|tz |UTC |
|date |2024-02-15 |
|pandoc |2.19.2 @ /usr/bin/pandoc |
|field |value |
|:--------|:------------------------------------------------------|
|version |R version 4.3.3 (2024-02-29) |
|os |Ubuntu 20.04.6 LTS |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |C.UTF-8 |
|ctype |C.UTF-8 |
|tz |UTC |
|date |2024-03-26 |
|pandoc |3.1.11 @ /opt/hostedtoolcache/pandoc/3.1.11/x64/pandoc |

# Dependencies

|package |old |new |Δ |
|:---------|:------|:------|:--|
|openxlsx2 |1.3 |1.4 |* |
|openxlsx2 |1.4 |1.5 |* |
|magrittr |2.0.3 |2.0.3 | |
|R6 |2.5.1 |2.5.1 | |
|Rcpp |1.0.12 |1.0.12 | |
Expand Down
2 changes: 1 addition & 1 deletion revdep/cran.md
@@ -1,6 +1,6 @@
## revdepcheck results

We checked 3 reverse dependencies (0 from CRAN + 3 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 4 reverse dependencies (0 from CRAN + 4 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-write.R
Expand Up @@ -883,11 +883,11 @@ test_that("writing vectors direction with dims works", {
# write vectors column or rowwise
wb <- wb_workbook()$add_worksheet()$
add_data(x = 1:2, dims = "A1:B1")$
add_data(x = t(1:2), dims = "D1:D2", col_names = FALSE)$
add_data(x = t(1:2), dims = "D1:D2", col_names = FALSE)$ # ignores dims
add_data(x = 1:2, dims = "A3:A4")$
add_data(x = t(1:2), dims = "D3:E3", col_names = FALSE)
add_data(x = t(1:2), dims = "D3:E3", col_names = FALSE) # ignores dims

exp <- c("A1", "B1", "D1", "E1", "A3", "D3", "A4", "D4")
exp <- c("A1", "B1", "D1", "E1", "A3", "D3", "E3", "A4")
got <- wb$worksheets[[1]]$sheet_data$cc$r
expect_equal(exp, got)

Expand Down

0 comments on commit 925bec2

Please sign in to comment.