This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(patchwork) | |
theme_set(theme_classic()) | |
paises <- c("Argentina", "Bolivia", "Brasil", "Chile", "Colombia", | |
"Costa Rica", "Cuba", "Ecuador", "El Salvador", "Guatemala", "Honduras", | |
"México", "Nicaragua", "Panamá", "Paraguay", "Perú", "Rep Dominicana", | |
"Uruguay", "Venezuela") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(ineq) | |
options(scipen = 999) | |
theme_set(theme_classic()) | |
base <- rep(1000, 1000) | |
lista <- list() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(rvest) | |
library(RSelenium) | |
# funciones pa limpiar | |
limpieza <- function(objtabla){ | |
objtabla <- objtabla[-which(is.na(objtabla[,1])), ] | |
objtabla <- objtabla[c(1:(nrow(objtabla)-5)),] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(XML) | |
library(RCurl) | |
library(tm) | |
library(wordcloud2) | |
library(stm) | |
library(pdftools) | |
library(tidyverse) | |
library(patchwork) | |
library(ggwordcloud) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(countrycode) | |
library(gganimate) | |
library(gifski) | |
theme_set(theme_classic()) | |
tiempo <- read.csv("annual-working-hours-per-worker.csv") | |
colnames(tiempo)[4] <- "tiempo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(directlabels) | |
theme_set(theme_bw(base_size = 21)) | |
options(scipen = 999) | |
dat <- readxl::read_excel("mpd2020.xlsx", sheet = 3) %>% | |
filter(country %in% c("Argentina", "Chile", "Brazil","Sweden", "United States", | |
"Norway", "Uruguay", "United Kingdom", "Panama"), | |
year >= 1870) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
theme_set(theme_bw(base_size = 21)) | |
options(scipen = 999) | |
dat <- read.csv("dataregionesChile.csv") | |
# filtrar el año 2020 | |
y2020 <- dat %>% filter(year == 2020) | |
# generar histograma |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generate_regression_table <- function(models, se_type = "HC3") { | |
require(sandwich) | |
require(lmtest) | |
# Initialize lists to store results | |
results_list <- list() | |
# Loop over each model | |
for (i in seq_along(models)) { | |
model <- models[[i]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(foreign) | |
dat <- read.dta("http://fmwww.bc.edu/ec-p/data/wooldridge/gpa1.dta") | |
coef(lm(colGPA ~ ACT + hsGPA, data = dat)) | |
coef(lm(colGPA ~ hsGPA, data = dat)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(haven) | |
theme_set(theme_bw(base_size = 24)) | |
dat <- read_dta("http://fmwww.bc.edu/ec-p/data/wooldridge/wage1.dta") | |
dat %>% | |
ggplot() + |
OlderNewer