{"id":3550,"date":"2023-03-08T15:43:41","date_gmt":"2023-03-08T15:43:41","guid":{"rendered":"https:\/\/ricovictor.com\/?p=3550"},"modified":"2023-03-08T19:04:29","modified_gmt":"2023-03-08T19:04:29","slug":"crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14","status":"publish","type":"post","link":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/","title":{"rendered":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3550\" class=\"elementor elementor-3550\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-12f091a1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"12f091a1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-318af248\" data-id=\"318af248\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-345da4c2 elementor-widget elementor-widget-text-editor\" data-id=\"345da4c2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>En esta clase aprenderemos a crear gr\u00e1ficos en Barras en R.\u00a0 <strong>Abajo tienes el c\u00f3digo en R del video( Descarga los datos que usan en el tutorial aqu\u00ed)<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4876b6e2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4876b6e2\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-55cb1b18\" data-id=\"55cb1b18\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-68e8faee elementor-widget elementor-widget-video\" data-id=\"68e8faee\" data-element_type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/youtu.be\\\/jB_FTP04_9Y&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5b8a1a8d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5b8a1a8d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-68561617\" data-id=\"68561617\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7eaf85b1 elementor-widget elementor-widget-text-editor\" data-id=\"7eaf85b1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><!-- wp:paragraph --><\/p><p>DATOS Y C\u00d3DIGO EN R<\/p><p><strong>\u00a0<\/strong><\/p><p><!-- \/wp:paragraph --><\/p><p><!-- wp:file {\"id\":3517,\"href\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_argentina.csv\"} --><\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-9aa419ac-a999-476f-bb43-b8ce0227d8c0\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_argentina.csv\">pib_per_capita_argentina<\/a><a class=\"wp-block-file__button wp-element-button\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_argentina.csv\" download=\"\" aria-describedby=\"wp-block-file--media-9aa419ac-a999-476f-bb43-b8ce0227d8c0\">Descarga<\/a><\/div><p><!-- \/wp:file --><\/p><p><!-- wp:file {\"id\":3518,\"href\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_chile.csv\"} --><\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-57bb9a9a-ff83-4655-a821-05de2aca6aa4\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_chile.csv\">pib_per_capita_chile<\/a><a class=\"wp-block-file__button wp-element-button\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_chile.csv\" download=\"\" aria-describedby=\"wp-block-file--media-57bb9a9a-ff83-4655-a821-05de2aca6aa4\">Descarga<\/a><\/div><p><!-- \/wp:file --><\/p><p><!-- wp:file {\"id\":3519,\"href\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_espana.csv\"} --><\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-6b207124-5e7f-45f7-b1eb-8a36d7132a1e\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_espana.csv\">pib_per_capita_espa\u00f1a<\/a><a class=\"wp-block-file__button wp-element-button\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_espana.csv\" download=\"\" aria-describedby=\"wp-block-file--media-6b207124-5e7f-45f7-b1eb-8a36d7132a1e\">Descarga<\/a><\/div><p><!-- \/wp:file --><\/p><p><!-- wp:file {\"id\":3520,\"href\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_mexico.csv\"} --><\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-637ffdd5-425a-4a0a-bb81-c74c99643332\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_mexico.csv\">pib_per_capita_mexico<\/a><a class=\"wp-block-file__button wp-element-button\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/pib_per_capita_mexico.csv\" download=\"\" aria-describedby=\"wp-block-file--media-637ffdd5-425a-4a0a-bb81-c74c99643332\">Descarga<\/a><\/div><p><!-- \/wp:file --><\/p><p><!-- wp:file {\"id\":3521,\"href\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/poblacion_mexico.csv\"} --><\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-4fc2db42-1886-4f5e-8396-2f44fad4d952\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/poblacion_mexico.csv\">poblacion_mexico<\/a><a class=\"wp-block-file__button wp-element-button\" href=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/poblacion_mexico.csv\" download=\"\" aria-describedby=\"wp-block-file--media-4fc2db42-1886-4f5e-8396-2f44fad4d952\">Descarga<\/a><\/div><p><!-- \/wp:embed --><\/p><p><!-- wp:code --><\/p><pre class=\"wp-block-code\"><br \/><code><\/code><\/pre><p><!-- \/wp:code --><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b4c82dc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b4c82dc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-adfc518\" data-id=\"adfc518\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8f89512 elementor-widget elementor-widget-text-editor\" data-id=\"8f89512\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>#VIDEO GRAFICO DE BARRAS<\/p><p>#Para crear un gr\u00e1fico de barras en R, <br \/>#puedes usar la funci\u00f3n de R base barplot<\/p><p>#1 creamos tabla<\/p><p><br \/>#pib per capita espa\u00f1a en datacommons<\/p><p>pib_mexico_per &lt;- read.csv(\u00abC:\\\\Users\\\\Victor-PC\\\\Desktop\\\\ECONOMIA_HISPANA\\\\pib_per_capita_mexico.csv\u00bb,header=TRUE, stringsAsFactors=FALSE)<\/p><p><br \/>pib_espa\u00f1a_per &lt;- read.csv(\u00abC:\\\\Users\\\\Victor-PC\\\\Desktop\\\\ECONOMIA_HISPANA\\\\pib_per_capita_espa\u00f1a.csv\u00bb,header=TRUE, stringsAsFactors=FALSE)<\/p><p><br \/>pib_argentina_per &lt;- read.csv(\u00abC:\\\\Users\\\\Victor-PC\\\\Desktop\\\\ECONOMIA_HISPANA\\\\pib_per_capita_argentina.csv\u00bb,header=TRUE, stringsAsFactors=FALSE)<\/p><p><br \/>pib_chile_per &lt;- read.csv(\u00abC:\\\\Users\\\\Victor-PC\\\\Desktop\\\\ECONOMIA_HISPANA\\\\pib_per_capita_chile.csv\u00bb,header=TRUE, stringsAsFactors=FALSE)<\/p><p>\u00a0<\/p><p><br \/>PIB_ESPA\u00d1A &lt;- head(pib_espa\u00f1a_per$PIB.per.c\u00c3.pita)[1]<br \/>PIB_ESPA\u00d1A<\/p><p>PIB_ARGENTINA &lt;- head(pib_argentina_per$PIB.per.c\u00c3.pita)[1]<br \/>PIB_ARGENTINA<\/p><p>PIB_CHILE &lt;- head(pib_chile_per$PIB.per.c\u00c3.pita)[1]<br \/>PIB_CHILE<\/p><p>PIB_MEXICO &lt;- head(pib_mexico_per$PIB.per.c\u00c3.pita)[1]<br \/>PIB_MEXICO<\/p><p>#paises &lt;- c ( \u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb)<\/p><p>PIB_paises&lt;- c(PIB_ESPA\u00d1A,PIB_CHILE,PIB_ARGENTINA,PIB_MEXICO)<\/p><p>#rownames(PIB_paises) &lt;- c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb)<br \/>PIB_paises<\/p><p>#USAREMMOS LA FUNCION barplot<\/p><p>?barplot<\/p><p>#La funci\u00f3n barplot en R<br \/># grafico en frecuencia absoluta y porcentaje<br \/>#1 T\u00edtulo, etiquetas y colores del gr\u00e1fico de barras<br \/>#2 Cambiar las etiquetas de cada grupo<br \/>#3 Espacio y ancho de las barras<br \/>#4 Gr\u00e1fico de barras horizontal en R<br \/># Leyenda del gr\u00e1fico de barras<\/p><p>\u00a0<\/p><p># Gr\u00e1fico de barras de frecuencia absoluta<\/p><p>barplot(PIB_paises, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = rainbow(4))<\/p><p>barplot(PIB_paises, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = c(\u00abgreen\u00bb,\u00bbblue\u00bb,\u00bbred\u00bb,\u00bbyellow\u00bb))<\/p><p>#CAMBIAMOS LAS ETIQUETAS DE CADA GRUPO<\/p><p>barplot(PIB_paises, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb))<\/p><p>#\u25d9 Graficos en porcentajes ( frencuencia relativa)<\/p><p>barplot( prop.table(PIB_paises)*100, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb))<\/p><p><br \/># A\u00f1adir texto<\/p><p>grafico_p&lt;- barplot(PIB_paises, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb))<\/p><p>text(grafico_p,PIB_paises-500 ,labels=PIB_paises)<\/p><p><br \/>#a\u00f1adir rejilla con la funci\u00f3n grid<\/p><p>grid(nx = NA, ny = NULL, lwd = 1, lty = 1, col = \u00abblack\u00bb)<br \/>grafico_p&lt;- barplot(PIB_paises, main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb),add = TRUE)<\/p><p># t\u00edtulos y etiequetas X e y<\/p><p>barplot(PIB_paises, <br \/>main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>xlab= \u00abPaises\u00bb,<br \/>ylab= \u00abD\u00f3lares\u00bb,<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb))<\/p><p><br \/># CAMBIAR TAMA\u00d1O DE LAS BARRAS <br \/><br \/>barplot(PIB_paises, <br \/>main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>xlab= \u00abPaises\u00bb,<br \/>ylab= \u00abD\u00f3lares\u00bb,<br \/>width=c(0.9, 0.1, 0.4,0.2),<br \/>col = rainbow(4),names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb))<br \/><br \/># GRAFICOS DE BARRAS EN HORIZONTAL <br \/><br \/>barplot(PIB_paises, <br \/>main = \u00abPIB PER C\u00c1PITA\u00bb,<br \/>#xlab= \u00abPaises\u00bb,<br \/>#ylab= \u00abD\u00f3lares\u00bb,<br \/>#width=c(0.3, 1, 0.4,0.2),<br \/>col = rainbow(4),<br \/>names.arg = c(\u00abESPA\u00d1A\u00bb,\u00bbCHILE\u00bb,\u00bbARGENTINA\u00bb,\u00bbMEXICO\u00bb),<br \/>horiz= TRUE)<br \/><br \/><br \/><br \/>VA&lt;-VADeaths<\/p><p>mp &lt;- barplot(VADeaths) # default<br \/>tot &lt;- colMeans(VADeaths)<br \/>text(mp, tot + 3, format(tot), xpd = TRUE, col = \u00abblue\u00bb)<\/p><p>barplot(VADeaths, beside = TRUE,<br \/>col = c(\u00ablightblue\u00bb, \u00abmistyrose\u00bb, \u00ablightcyan\u00bb,<br \/>\u00ablavender\u00bb, \u00abcornsilk\u00bb),<br \/>legend.text = rownames(VADeaths), ylim = c(0, 100))<\/p><p>title(main = \u00abDeath Rates in Virginia\u00bb, font.main = 4)<\/p><p>\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>En esta clase aprenderemos a crear gr\u00e1ficos en Barras en R.\u00a0 Abajo tienes el c\u00f3digo en R del video( Descarga los datos que usan en el tutorial aqu\u00ed) https:\/\/youtu.be\/jB_FTP04_9Y DATOS Y C\u00d3DIGO EN R \u00a0 #VIDEO GRAFICO DE BARRAS #Para crear un gr\u00e1fico de barras en R, #puedes usar la funci\u00f3n de R base barplot &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\"> <span class=\"screen-reader-text\">Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14<\/span> Leer m\u00e1s &raquo;<\/a><\/p>\n","protected":false},"author":19,"featured_media":3527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[13],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\" \/>\n<meta property=\"og:description\" content=\"En esta clase aprenderemos a crear gr\u00e1ficos en Barras en R.\u00a0 Abajo tienes el c\u00f3digo en R del video( Descarga los datos que usan en el tutorial aqu\u00ed) https:\/\/youtu.be\/jB_FTP04_9Y DATOS Y C\u00d3DIGO EN R \u00a0 #VIDEO GRAFICO DE BARRAS #Para crear un gr\u00e1fico de barras en R, #puedes usar la funci\u00f3n de R base barplot &hellip; Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 Leer m\u00e1s &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\" \/>\n<meta property=\"og:site_name\" content=\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-08T15:43:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-08T19:04:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/victor-a.rico-29.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Victor A.Rico\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Victor A.Rico\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\"},\"author\":{\"name\":\"Victor A.Rico\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/e563011388ed0c4e7c1cdae9fcf95bae\"},\"headline\":\"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14\",\"datePublished\":\"2023-03-08T15:43:41+00:00\",\"dateModified\":\"2023-03-08T19:04:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\"},\"wordCount\":639,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ricovictor.com\/#organization\"},\"articleSection\":[\"R studio\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\",\"url\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\",\"name\":\"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"isPartOf\":{\"@id\":\"https:\/\/ricovictor.com\/#website\"},\"datePublished\":\"2023-03-08T15:43:41+00:00\",\"dateModified\":\"2023-03-08T19:04:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/ricovictor.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ricovictor.com\/#website\",\"url\":\"https:\/\/ricovictor.com\/\",\"name\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ricovictor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ricovictor.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ricovictor.com\/#organization\",\"name\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"url\":\"https:\/\/ricovictor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png\",\"contentUrl\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png\",\"width\":1402,\"height\":474,\"caption\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\"},\"image\":{\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/e563011388ed0c4e7c1cdae9fcf95bae\",\"name\":\"Victor A.Rico\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4edf55780c0c232271ecbcb12fae9460?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4edf55780c0c232271ecbcb12fae9460?s=96&d=mm&r=g\",\"caption\":\"Victor A.Rico\"},\"url\":\"https:\/\/ricovictor.com\/index.php\/author\/granada_26_wp\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/","og_locale":"es_ES","og_type":"article","og_title":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","og_description":"En esta clase aprenderemos a crear gr\u00e1ficos en Barras en R.\u00a0 Abajo tienes el c\u00f3digo en R del video( Descarga los datos que usan en el tutorial aqu\u00ed) https:\/\/youtu.be\/jB_FTP04_9Y DATOS Y C\u00d3DIGO EN R \u00a0 #VIDEO GRAFICO DE BARRAS #Para crear un gr\u00e1fico de barras en R, #puedes usar la funci\u00f3n de R base barplot &hellip; Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 Leer m\u00e1s &raquo;","og_url":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/","og_site_name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","article_published_time":"2023-03-08T15:43:41+00:00","article_modified_time":"2023-03-08T19:04:29+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/ricovictor.com\/wp-content\/uploads\/2023\/03\/victor-a.rico-29.jpg","type":"image\/jpeg"}],"author":"Victor A.Rico","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Victor A.Rico","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#article","isPartOf":{"@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/"},"author":{"name":"Victor A.Rico","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/e563011388ed0c4e7c1cdae9fcf95bae"},"headline":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14","datePublished":"2023-03-08T15:43:41+00:00","dateModified":"2023-03-08T19:04:29+00:00","mainEntityOfPage":{"@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/"},"wordCount":639,"commentCount":0,"publisher":{"@id":"https:\/\/ricovictor.com\/#organization"},"articleSection":["R studio"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/","url":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/","name":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14 - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","isPartOf":{"@id":"https:\/\/ricovictor.com\/#website"},"datePublished":"2023-03-08T15:43:41+00:00","dateModified":"2023-03-08T19:04:29+00:00","breadcrumb":{"@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ricovictor.com\/index.php\/2023\/03\/08\/crear-graficos-de-barras-en-r-aprende-r-desde-0-clase-14\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/ricovictor.com\/"},{"@type":"ListItem","position":2,"name":"Crear Gr\u00e1ficos de Barras en R | Aprende R desde 0 \/ Clase 14"}]},{"@type":"WebSite","@id":"https:\/\/ricovictor.com\/#website","url":"https:\/\/ricovictor.com\/","name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","description":"","publisher":{"@id":"https:\/\/ricovictor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ricovictor.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/ricovictor.com\/#organization","name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","url":"https:\/\/ricovictor.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/","url":"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png","contentUrl":"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png","width":1402,"height":474,"caption":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas"},"image":{"@id":"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/e563011388ed0c4e7c1cdae9fcf95bae","name":"Victor A.Rico","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4edf55780c0c232271ecbcb12fae9460?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4edf55780c0c232271ecbcb12fae9460?s=96&d=mm&r=g","caption":"Victor A.Rico"},"url":"https:\/\/ricovictor.com\/index.php\/author\/granada_26_wp\/"}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/3550"}],"collection":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/comments?post=3550"}],"version-history":[{"count":7,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/3550\/revisions"}],"predecessor-version":[{"id":3561,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/3550\/revisions\/3561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/media\/3527"}],"wp:attachment":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/media?parent=3550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/categories?post=3550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/tags?post=3550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}