Hi, I've been trying to create a table using the gt package. I am using the following article as guidance: https://gt.rstudio.com/articles/intro-creating-gt-tables.html
I tried to recreate what the authors did exactly, using the Island data (same as the authors)
islands_tbl <-
dplyr::tibble(
name = names(islands),
size = islands
) %>%
dplyr::arrange(desc(size)) %>%
dplyr::slice(1:10)
islands_tbl
gt_tbl <- gt(data = islands_tbl)
# Show the gt Table
gt_tbl
But I get this error:
Error in gt(data = islands_tbl) : unused argument (data = islands_tbl)
Any help is greatly appreciated!
clausp
March 18, 2020, 5:35pm
2
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?
Why reprex?
Getting unstuck is hard. Your first step here is usually to create a reprex, or reproducible example. The goal of a reprex is to package your code, and information about your problem so that others can run it and feel your pain. Then, hopefully, folks can more easily provide a solution.
What's in a Reproducible Example?
Parts of a reproducible example:
background information - Describe what you are trying to do. What have you already done?
complete set up - include any library() calls and data to reproduce your issue.
data for a reprex: Here's a discussion on setting up data for a reprex
make it run - include the minimal code required to reproduce your error on the data…
system
Closed
April 8, 2020, 5:35pm
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.