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

Why does in_rows return footnote attribute? #198

Closed
anajens opened this issue May 10, 2021 · 1 comment
Closed

Why does in_rows return footnote attribute? #198

anajens opened this issue May 10, 2021 · 1 comment

Comments

@anajens
Copy link
Contributor

anajens commented May 10, 2021

In the case where in_rows wraps multiple rows, the object includes both footnotes and footnote attribute vs only footnotes for single row. Why does this happen?

library(rtables)
r1 <- in_rows(
  .list = list(
    ncols = rcell(5L, "xx", label = "ncol")
  )
)
attributes(r1$ncols)
$format
[1] "xx"

$colspan
[1] 1

$label
[1] "ncol"

$indent_mod
[1] 0

$footnotes
list()

$class
[1] "CellValue"
r2 <- in_rows(
  .list = list(
    ncols = rcell(5L, "xx", label = "ncol"),
    nrows = rcell(10L, "xx", label = "nrow")
  )
)
attributes(r2$ncols)
$format
[1] "xx"

$colspan
[1] 1

$label
[1] "ncol"

$indent_mod
[1] 0

$footnotes
list()

$class
[1] "CellValue"

$footnote
list()

Session Info:

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rtables_0.3.7.0004 magrittr_2.0.1    

loaded via a namespace (and not attached):
[1] compiler_3.6.3  htmltools_0.4.0 tools_3.6.3     Rcpp_1.0.4.6    digest_0.6.25   rlang_0.4.
@gmbecker
Copy link
Contributor

This was just a bug. Fixed in above commit.

@gmbecker gmbecker added this to ToDo in May - Jul 2021 via automation May 10, 2021
@gmbecker gmbecker moved this from ToDo to Done in May - Jul 2021 May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants