davidgohel / flextable

table farming
https://ardata-fr.github.io/flextable-book/
565 stars 82 forks source link

Header showing up with class of variable (integer/numeric) #554

Closed wfdefreitas closed 1 year ago

wfdefreitas commented 1 year ago

Not sure if I am doing something incorrect or if this is a result of updating Rstudio to 2023.06.0 build 421, but can't seem to get flextable without class of variable printing below the header.

mtcars |> 
  as_flextable()

output shows:

image

How do I get rid of the row with "numeric"?

tried to void:

mtcars |> 
  as_flextable() |> 
  void(i=2, part="header")

but get this error

Error in void(as_flextable(mtcars), i = 2, part = "header") : 
  unused argument (i = 2)

tried to set as NULL:

mtcars$header$dataset[2,] <- NULL

but get this error

Error in x[[jj]][iseq] <- vjj : replacement has length zero

Help?

davidgohel commented 1 year ago

See ?as_flextable and ?flextable(). I think you only want flextable()

wfdefreitas commented 1 year ago

Well that was silly! Sorry and thank you!

github-actions[bot] commented 11 months ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.