Home > other >  Why is flextable suddenly throwing an error in R?
Why is flextable suddenly throwing an error in R?

Time:01-26

The flextable align() function is throwing this error:

Error in UseMethod("align") : no applicable method for 'align' applied to an object of class "flextable"

It even occurs in the package example:

library(flextable)
ft <- flextable(head(mtcars)[,3:6])
ft <- align(ft, align = "right", part = "all")
ft

I'm using flextable 0.6.10 and R 4.1.2

CodePudding user response:

I suspect you have another package with a function named align loaded after flextable. Can you try prefixing with flextable::align and see if the error goes away?

  •  Tags:  
  • Related