What is the equivalent of R's list() function in sparklyr?
问题 Below is a sample R code. I would like to do the same in sparklyr. custTrans1 <- Pdt_table %>% group_by(Main_CustomerID) %>% summarise(Invoice = as.vector(list(Invoice_ID)),Industry = as.vector(list(Industry))) where Pdt_table is spark data frame and Main_CustomerID, Invoice_ID and Industry are variables. I would like to create list of the above variables and convert it to vector. How can I do it in sparklyr ? 回答1: You can use collect_list or collect_set: set.seed(1) df <- copy_to( sc, tibble