What is the difference between . and .data?
问题 I'm trying to develop a deeper understanding of using the dot (".") with dplyr and using the .data pronoun with dplyr . The code I was writing that motivated this post, looked something like this: cat_table <- tibble( variable = vector("character"), category = vector("numeric"), n = vector("numeric") ) for(i in c("cyl", "vs", "am")) { cat_stats <- mtcars %>% count(.data[[i]]) %>% mutate(variable = names(.)[1]) %>% rename(category = 1) cat_table <- bind_rows(cat_table, cat_stats) } # A tibble: