Revisión | 626baeef9bc4307804a1db36aeb0c0d2a472d04e (tree) |
---|---|
Tiempo | 2023-02-03 23:43:16 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I modified the add_total function to make sure I operate on a tibble.
@@ -4658,8 +4658,20 @@ | ||
4658 | 4658 | |
4659 | 4659 | ## I rewrite the function above using the native pipe. |
4660 | 4660 | |
4661 | +## add_total <- function(x, pos=1, ...){ | |
4662 | +## adorn_totals(x, ...) |> | |
4663 | +## as_tibble() |> | |
4664 | +## (\(x) move_row(x, nrow(x)+1, pos))() | |
4665 | + | |
4666 | +## } | |
4667 | + | |
4668 | + | |
4669 | + | |
4661 | 4670 | add_total <- function(x, pos=1, ...){ |
4662 | - adorn_totals(x, ...) |> | |
4671 | + | |
4672 | + x <- as_tibble() |> | |
4673 | + | |
4674 | + adorn_totals( ...) |> | |
4663 | 4675 | as_tibble() |> |
4664 | 4676 | (\(x) move_row(x, nrow(x)+1, pos))() |
4665 | 4677 |
@@ -4667,6 +4679,8 @@ | ||
4667 | 4679 | |
4668 | 4680 | |
4669 | 4681 | |
4682 | + | |
4683 | + | |
4670 | 4684 | ## See split(d, ceiling(seq_along(d)/20)) |
4671 | 4685 | |
4672 | 4686 | split_vec <- function(d, mylen){ |