Help us understand the problem. What is going on with this article?

R: 神の作りし関数 dplyr::group_walk() を君は知っているか。

知らなかった人は今日感動するべき:

grouped_tibble_to_tsv_files.R
# なんでもよいのでグループ化して
res %<>% group_by(storename)

#グループ別に.tsvファイルに書き出す
res %>% group_walk(~ write_csv(.x, paste0("res_", .y$storename, ".tsv")))

超短い手抜きエントリーですが、つどカスタム関数書いてた人多いのでは?
やばいぜあついぜ tidyverse、アツクテシヌゼ...
0.8.0以降からの新機能との事。

たまに公式を読み返そうと思いました:
https://dplyr.tidyverse.org/reference/group_map.html

さてあまりに記事が短いのでここで「dplyr言えるかな音頭〜♫」
さぁどれだけ言えるかな?

> pacman::p_funs(dplyr)
  [1] ".data"               "%>%"                 "add_count"           "add_count_"         
  [5] "add_row"             "add_rownames"        "add_tally"           "add_tally_"         
  [9] "all_equal"           "all_vars"            "anti_join"           "any_vars"           
 [13] "arrange"             "arrange_"            "arrange_all"         "arrange_at"         
 [17] "arrange_if"          "as_data_frame"       "as_tibble"           "as.tbl"             
 [21] "as.tbl_cube"         "auto_copy"           "bench_tbls"          "between"            
 [25] "bind_cols"           "bind_rows"           "case_when"           "changes"            
 [29] "check_dbplyr"        "coalesce"            "collapse"            "collect"            
 [33] "combine"             "common_by"           "compare_tbls"        "compare_tbls2"      
 [37] "compute"             "contains"            "copy_to"             "count"              
 [41] "count_"              "cumall"              "cumany"              "cume_dist"          
 [45] "cummean"             "current_vars"        "data_frame"          "data_frame_"        
 [49] "db_analyze"          "db_begin"            "db_commit"           "db_create_index"    
 [53] "db_create_indexes"   "db_create_table"     "db_data_type"        "db_desc"            
 [57] "db_drop_table"       "db_explain"          "db_has_table"        "db_insert_into"     
 [61] "db_list_tables"      "db_query_fields"     "db_query_rows"       "db_rollback"        
 [65] "db_save_query"       "db_write_table"      "dense_rank"          "desc"               
 [69] "dim_desc"            "distinct"            "distinct_"           "distinct_all"       
 [73] "distinct_at"         "distinct_if"         "distinct_prepare"    "do"                 
 [77] "do_"                 "dr_dplyr"            "ends_with"           "enexpr"             
 [81] "enexprs"             "enquo"               "enquos"              "ensym"              
 [85] "ensyms"              "eval_tbls"           "eval_tbls2"          "everything"         
 [89] "explain"             "expr"                "failwith"            "filter"             
 [93] "filter_"             "filter_all"          "filter_at"           "filter_if"          
 [97] "first"               "frame_data"          "full_join"           "funs"               
[101] "funs_"               "glimpse"             "group_by"            "group_by_"          
[105] "group_by_all"        "group_by_at"         "group_by_if"         "group_by_prepare"   
[109] "group_cols"          "group_data"          "group_indices"       "group_indices_"     
[113] "group_keys"          "group_map"           "group_nest"          "group_rows"         
[117] "group_size"          "group_split"         "group_trim"          "group_vars"         
[121] "group_walk"          "grouped_df"          "groups"              "hybrid_call"        
[125] "id"                  "ident"               "if_else"             "inner_join"         
[129] "intersect"           "is_grouped_df"       "is.grouped_df"       "is.src"             
[133] "is.tbl"              "lag"                 "last"                "last_col"           
[137] "lead"                "left_join"           "location"            "lst"                
[141] "lst_"                "make_tbl"            "matches"             "min_rank"           
[145] "mutate"              "mutate_"             "mutate_all"          "mutate_at"          
[149] "mutate_each"         "mutate_each_"        "mutate_if"           "n"                  
[153] "n_distinct"          "n_groups"            "na_if"               "near"               
[157] "nest_join"           "new_grouped_df"      "nth"                 "ntile"              
[161] "num_range"           "one_of"              "order_by"            "percent_rank"       
[165] "progress_estimated"  "pull"                "quo"                 "quo_name"           
[169] "quos"                "rbind_all"           "rbind_list"          "recode"             
[173] "recode_factor"       "rename"              "rename_"             "rename_all"         
[177] "rename_at"           "rename_if"           "rename_vars"         "rename_vars_"       
[181] "right_join"          "row_number"          "rowwise"             "same_src"           
[185] "sample_frac"         "sample_n"            "select"              "select_"            
[189] "select_all"          "select_at"           "select_if"           "select_var"         
[193] "select_vars"         "select_vars_"        "semi_join"           "setdiff"            
[197] "setequal"            "show_query"          "slice"               "slice_"             
[201] "sql"                 "sql_escape_ident"    "sql_escape_string"   "sql_join"           
[205] "sql_select"          "sql_semi_join"       "sql_set_op"          "sql_subquery"       
[209] "sql_translate_env"   "src"                 "src_df"              "src_local"          
[213] "src_mysql"           "src_postgres"        "src_sqlite"          "src_tbls"           
[217] "starts_with"         "summarise"           "summarise_"          "summarise_all"      
[221] "summarise_at"        "summarise_each"      "summarise_each_"     "summarise_if"       
[225] "summarize"           "summarize_"          "summarize_all"       "summarize_at"       
[229] "summarize_each"      "summarize_each_"     "summarize_if"        "sym"                
[233] "syms"                "tally"               "tally_"              "tbl"                
[237] "tbl_cube"            "tbl_df"              "tbl_nongroup_vars"   "tbl_sum"            
[241] "tbl_vars"            "tibble"              "top_n"               "transmute"          
[245] "transmute_"          "transmute_all"       "transmute_at"        "transmute_if"       
[249] "tribble"             "trunc_mat"           "type_sum"            "ungroup"            
[253] "union"               "union_all"           "validate_grouped_df" "vars"               
[257] "with_order"          "wrap_dbplyr_obj"    
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away