Writing to Excel
bake_sale <- tibble(
item = factor(c("brownie", "cupcake", "cookie")),
quantity = c(10, 5, 8)
)
bake_sale
## # A tibble: 3 × 2
## item quantity
## <fct> <dbl>
## 1 brownie 10
## 2 cupcake 5
## 3 cookie 8
write_xlsx(bake_sale, path = "data/bake-sale.xlsx")
- This is how the data look like in excel