library(purrr)
library(dplyr)
df %>% map(., ~tabyl(.))
You could select the columns you need:
df %>%
select(ID, value_type) %>%
map(., ~tabyl(.))
This gives us:
$ID
. n percent
A 2 0.6666667
B 1 0.3333333
$value_type
. n percent
new 2 0.6666667
old 1 0.3333333
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…