How to approach this strange error when working with the flextable library in R?

688 Views Asked by At

I'm trying to use the flextable library to make tables in RMarkdown (on an RStudio server). I'm getting a strange error message and can't make any progress on figuring out what I'm doing wrong. I'm getting this error message: Error in UUIDgenerate(n = nrow(uid), use.time = TRUE) : unused argument (n = nrow(uid)).

NOTE: The error occurs when I tried to run the code within the RMarkdown document to the console. The code below (and error output) occurred in an R Script.

This code below produces the error:

library(flextable)

ft <- flextable(head(mtcars))

ft

Error in UUIDgenerate(n = nrow(uid), use.time = TRUE) : 
  unused argument (n = nrow(uid))


head_ft <- flextable(as.data.frame(mtcars))

head_ft

Error in UUIDgenerate(n = nrow(uid), use.time = TRUE) : 
  unused argument (n = nrow(uid))


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


packageVersion("flextable")
[1] ‘0.5.11’
1

There are 1 best solutions below

1
On

You need to update the package uuid. This issue is solved in the latest releases of flextable, so updating flextable should also update uuid automatically