Footnote support for flextable with more than 1 rows
Closed this issue · 3 comments
942kid commented
Hi,
First of all, thank you for the great package!
I was playing around with the examples in the vignettes, and found that the footnote support seemed not working as expected if more than 1 rows present in the flextable. Please see the example below adapted from the code in the package vignette.
library(flextable)
library(ftExtra)
data.frame(
package = c("flextable", "ftExtra"),
description = c("Original Flextable", "Extensions for 'Flextable'^[Supports of footnotes]"),
stringsAsFactors = FALSE
) %>%
as_flextable() %>%
colformat_md() %>%
flextable::autofit(add_w = 0.5)
#> Error in FUN(newX[, i], ...): Item 2 has 14 columns, inconsistent with item 1 which has 17 columns. To fill missing columns use fill=TRUE.
Created on 2021-03-22 by the reprex package (v1.0.0)
atusy commented
Thank you for using ftExtra.
I reproduced the issue with the CRAN version, but not on GitHub.
Maybe there is a bug in CRAN version, which I fixed without being aware of it on GitHub.
Would you try install the latest version on GitHub with
# Enable this universe
options(repos = c(
atusy = 'https://atusy.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))
# Install ftExtra
install.packages('ftExtra')
942kid commented
Installing the GitHub version resolved the issue. Thanks for looking into the differences!
atusy commented
Great!