gt function error

I just tried this on RStudio Cloud and it worked fine. Could you try to create a reprex (including the library call to gt), so we can get a bit more detail?