Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

Doubled entry in a table footer row #58

Closed
alliquot opened this issue Jan 9, 2015 · 3 comments
Closed

Doubled entry in a table footer row #58

alliquot opened this issue Jan 9, 2015 · 3 comments
Labels

Comments

@alliquot
Copy link

alliquot commented Jan 9, 2015

What I want is to have some lines of text in a table footer.

So I wrote the code:
table <- addFooterRow( table, value="aaa", colspan = ncol(dataSet))
table[, , to="footer", newpar = TRUE] = "bbb"
table[, , to="footer", newpar = TRUE] = "ccc"

But this results in:
aaa
bbb
bbb
ccc
ccc

where I expect:
aaa
bbb
ccc

How can I add some lines to the same footer row?

EDIT:
When I changed some the code into:
table <- addFooterRow( table, value="aaa", colspan = ncol(dataSet))
table[, , to="footer", newpar = FALSE] = "bbb"
table[, , to="footer", newpar = FALSE] = "ccc"

the result is now: aaabbbbbbcccccc
(3xa, 2x3xb, 2x3xc)

So the problem with doubling content is common.

This is the most actual version, compiled from sources.

@davidgohel davidgohel added the bug label Jan 9, 2015
@davidgohel
Copy link
Owner

OK, this will be fixed...
The content is repeated from column 1 to column p but should not as columns are spanned.

There is a workaround by specifying the column index:

table <- addFooterRow( table, value="aaa", colspan = ncol(dataSet))
table[, 1, to="footer", newpar = TRUE] = "bbb"
table[, 1, to="footer", newpar = TRUE] = "ccc"

@alliquot
Copy link
Author

alliquot commented Jan 9, 2015

That works as expected, thank you.

@alliquot alliquot closed this as completed Jan 9, 2015
@davidgohel davidgohel reopened this Jan 9, 2015
@davidgohel
Copy link
Owner

Just reopened the issue so I won't forget it until it is solved...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants