Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
migconforto authored Sep 2, 2022
1 parent 88520ba commit e217fba
Show file tree
Hide file tree
Showing 4 changed files with 1,221 additions and 1,207 deletions.
104 changes: 56 additions & 48 deletions R/pnadc_faixas.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -467,15 +468,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -729,15 +731,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -973,15 +976,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -1239,15 +1243,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -1484,15 +1489,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -1754,15 +1760,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE, na.rm.all = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down Expand Up @@ -1999,15 +2006,16 @@ pnadc_tracks <- function(variable, filter, year, quartile, calculation, group, c
}

tabela <- survey::svyby(formula = variable, by = frml , design = design_PNADc, FUN = survey::svytotal, na.rm = TRUE)
tot.geral <- survey::svytotal(x = variable, design = design_PNADc, na.rm = TRUE)
tabela <- as.data.frame(tabela)
tot.geral <- tabela[1,]

tabela <- as.data.frame(tabela)
tot.geral <- as.data.frame(tot.geral)
for (i in 3:ncol(tabela)) {
tot.geral[1,i] <- sum(tabela[,i])
}

for (i in 1:nrow(tabela)) {
for (k in 3:ncol(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,1])
for (k in 3:ncol(tabela)) {
for (i in 1:nrow(tabela)) {
tabela[i, k] <- (tabela[i, k]/tot.geral[1,k])
}
}

Expand Down
Loading

0 comments on commit e217fba

Please sign in to comment.