cdc_pareto_lista: Priorizar listados en base a multiples covariables

Description Usage Arguments Value Functions Examples

View source: R/cdc_priorities.R

Description

Mostrar qué elementos representan el 80

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cdc_pareto_lista(data, variable, pareto_cut = 85)

cdc_pareto_lista_2(data, variable_c, variable_d, pareto_cut = 80)

cdc_carga_coalesce(data)

cdc_pareto_plot(
  cdc_pareto_lista,
  pct_,
  cum_,
  variable_value,
  variable_label,
  with_format = TRUE
)

Arguments

data

base de datos

variable

variable numérica contínua bajo la cual priorizar algún listado

pareto_cut

punto de corte tipo pareto

variable_c

variable continua

variable_d

variable discreta

cdc_pareto_lista

resultado de cdc_pareto_lista

pct_

porcentaje individual

cum_

porcenjate acumulado

variable_value

nombre de la variable numerica evaluada

variable_label

nombre de la variable para las etiquetas

with_format

add axis scale, fixed coordinates and ggrepel labels

Value

selección por criterio pareto y coalescencia para multiples covariables

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## Not run: 

library(tidyverse)
library(charlatan)

n_obs <- 11
set.seed(n_obs)

ch_data_wide <- tibble(
  #names
  name = ch_currency(n = n_obs),
  #values
  category = ch_integer(n = n_obs,min = 0,max = 1) %>% as.logical(),
  # category_02 = ch_integer(n = n_obs,min = 0,max = 1) %>% as.logical(),
  value_01 = ch_beta(n = n_obs,shape1 = 2,shape2 = 8),
  value_02 = ch_integer(n = n_obs,min = 1.2,max = 9.6)) %>%
  pivot_longer(cols = value_01:value_02,
               names_to = "variable",
               values_to = "numeric") %>%
  mutate(beta = ch_beta(n = n_obs*2,shape1 = 1,shape2 = 8))

cdcper::cdc_pareto_lista(data = ch_data_wide,
                         variable = numeric,
                         pareto_cut = 80) %>%
  epihelper::print_inf()

#cdcper::cdc_pareto_lista_2(data = ch_data_wide,
#                          variable_c = numeric,
#                          variable_d = category,
#                          pareto_cut = 80) %>%
# epihelper::print_inf()
#
#cdcper::cdc_pareto_lista(data = ch_data_wide,
#                        variable = numeric,
#                        pareto_cut = 80) %>%
# cdcper::cdc_pareto_lista(variable = beta,
#                          pareto_cut = 85) %>%
# epihelper::print_inf()
#
#cdcper::cdc_pareto_lista(data = ch_data_wide,
#                        variable = numeric,
#                        pareto_cut = 80) %>%
# cdcper::cdc_pareto_lista(variable = beta,
#                          pareto_cut = 85) %>%
# cdcper::cdc_carga_coalesce() %>%
# epihelper::print_inf()

cdcper::cdc_pareto_lista(data = ch_data_wide,
                         variable = numeric,
                         pareto_cut = 80) %>%
  cdcper::cdc_pareto_plot(pct_ = pct_numeric,
                          cum_ = cum_numeric,
                          variable_value = numeric,
                          variable_label = name) #%>%
  # plotly::ggplotly()


## End(Not run)

avallecam/cdcper documentation built on Dec. 19, 2021, 5:46 a.m.