write_bg_split: Make proportions of a list of factorial variables, and write...

Description Usage Arguments Value Examples

View source: R/write_bg_split.R

Description

Make proportions of a list of factorial variables, and write it in excel each variable in its own table

Usage

1
2
3
4
5
6
7
write_bg_split(
  x,
  ...,
  folder_name = getwd(),
  transpose = F,
  name = "n_of_variables_split.xlsx"
)

Arguments

x

a tbl() that contains the variables of interest, keyed by ID variable

...

list of variables names that would appear in output

folder_name

where would the output files will be saved (project's home by default).

transpose

should it be horizontal (FALSE by default).

name

name of xlsx output file.

Value

nothing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#example run
data=tribble(~ID,~car_size,~gender,
             "1","large","woman",
             "2","large","woman",
             "3","small","woman",
             "4","small","man",
             "5","small","man",
             "6","large","man",
             "7",NA,"man")

data %>%
   write_bg_split(car_size,gender,folder_name = "R",transpose = F)

sarid-ins/saridr documentation built on Nov. 10, 2020, 9:07 p.m.