In tidyr::complete, I have to input variable names , how to avoid it ? In actual, the variable are some many , it’s boring to input one by one…Anyone can help ? Thanks!
library(tidyverse)
raw_df <- data.frame(cat=c('A','B','C'),sub_category=c('1','2','3'))
Input variable name , the code run well
raw_df %>% tidyr::complete(cat,sub_category)
Below code can’t work–the input way i wished
raw_df %>% tidyr::complete()