I want to write the data frame in separate files by its groups but at the same time I don't want to the files to have the column which contains the group info.
For example, in the code below, I don't want the gear column in each separate file.
library(dplyr)
mtcars |>
group_by(gear) |>
do(write.table(., paste0(unique(.$gear), "_.txt"),
sep = "\t", row.names = F, col.names = F))
Any ideas? Thanks.