How to use the tableStack function in R

1

Good evening my teacher of Biostatistics is teaching to use the R, he passed the following question

(Construct frequency tables of RACE, CIVIL STATUS, and SCHOOLING.) Identify the categories of these variables that stand out, do the separation by year (Hint: use the tableStack command of the epiDisplay package. YEAR as a variable that will intersect with all the others).

But as much as you always try to make mistakes. Can anyone help me with this question?

using this photo as a database

    
asked by anonymous 16.07.2017 / 04:40

1 answer

1

It would be nice if you put the code you are using and the error message that appears. See if the code below answers your question.

library(epiDisplay)
dados <- data.frame(
  Num = 1:3, DIASEMANA = c("DOM", "DOM", "DOM"),
  DIA_obito = c(01,01,01), MES_obito = c("JAN", "JAN", "JAN"),
  ANO_obito = c(2006,2006,2006), 
  CLASSE_hora_obito = c("00:00 a 05:59", "00:00 a 05:59", "00:00 a 05:59"),
  IDADE_se_vivo = c(40,42,29), IDADE = c(32,34,20), 
  SEXO = c("M", "F", "M"), RACACOR = c(4,4,4), ESTCIV = c(2,2,1),
  ESC = c(5,5,4), LOCOCOR = c("Via publica", "Via publica", "Hospital"),
  BAIACOR = c("PONTA NEGRA", "PONTA NEGRA", "ADRIANOPOLIS"),
  ENDOCOR = c("ESTRADA DA PONTA NEG", "ESTRADA DA PONTA NEG", "RUA RECIFE"),
  CLASSE_CB = c("OUTROS ATT", "OUTROS ATT", "OUTROS ATT"))
tableStack(RACACOR:ESC, dados)
    
17.07.2017 / 20:17