In order to remove the data saved (maybe by mistake) in your workspace from RStudio, you gotta find the route in the first message that you can see when opening Rstuido. For example, in my case I can read the following sentence when opening the program: Workspace loaded from ~/.RData. Then, open the terminal and write the … Sigue leyendo Removing data from Workspace in RStudio (in MAC)
Etiqueta: R
Compressing big data files in R
Right now I am working with a big data file (+ 1million rows and several columns). Let's suppose that the name of the file is bigdata.txt. The size of this file is around 128MB; thus copying it into my Dropbox is not a good idea. However, after compressing my file in R, now the size … Sigue leyendo Compressing big data files in R
Write this code on Mac’s Terminal if you have R issues with spanish accents
If you are writing in spanish inside R for MAC, maybe you will face an encoding issue when you type particular symbols as: ñ, á, é, í, ó, ú, etc. You can stop suffering by typing the following command on your terminal:defaults write org.R-project.R force.LANG en_US.UTF-8
No, it is not a survey, it is a poll!
I disagree with all of the political analysts when it comes to Colombian Presidential Elections (CPE). Everybody start to talk, chat and conclude about what is happening and what is going to happen if elections would be held today. Of course the source of that conclusions (by the way, misleading conclusions!!!) are the political polls … Sigue leyendo No, it is not a survey, it is a poll!
samplesize4surveys R package (ss4s) – A message to my colleagues
I have worked for more than four years for a respected institution of the government of Colombia. My consulting job there is also linked with the review of sampling plans that external companies provide in order to get information about the impact that public programs may have over the people who benefit from some interventions. … Sigue leyendo samplesize4surveys R package (ss4s) – A message to my colleagues
Guide for writing good functions in R
Have you ever wondered how the heck do the programmers of R write the code behind the summary function? Have you noted that summary performs well in a vector, linear model, anova, etc. Well, I am right now writing an R package to compute sample sizes under different scenarios and this guide was very useful … Sigue leyendo Guide for writing good functions in R
Creating R packages in RStudio
RStudio is a powerful tool in hands of the applied statistician. For example, you can create beautiful documents using KnitR, which combine both LaTeX and R; you also can make beautiful presentations with Markdown. However, RStudio also serves as a friendly platform to create R packages. The following video will guide you in this easy … Sigue leyendo Creating R packages in RStudio
Creating R packages in Mavericks (OS X)
Creating R packages in Mac is very simple. When I first created the TeachingSampling R package in Windows, it was such a trek. I remember that I had to install a lot of apps in order to compile the library.Well, times have changed and right now I am a Mac user. Actually, one of the … Sigue leyendo Creating R packages in Mavericks (OS X)
Utlizando JAGS y RJAGS (en MAC)
Durante mis clases de estadística bayesiana, procuro que los estudiantes construyan sus propios MCMC, para los distintos modelos estadísticos que se consideran en el curso. Sin embargo, una ayuda importante para los estudiantes y el profesor es el manejo de softwares alternativos y automáticos que ejecutan los MCMC rápidamente. Es así como WinBugs se convierte … Sigue leyendo Utlizando JAGS y RJAGS (en MAC)
Grupo de usuarios de R en Bogotá (R Users Group in Bogotá)
Hace pocos días creamos el Bogotá R Users Group, como una iniciativa de algunas personas apasionadas por el software estadístico R en Bogotá. El objetivo general del grupo es compartir experiencias de los usuarios del software en Bogotá y servir de base para organizar encuentros y seminarios (presenciales y virtuales) que giren en torno al … Sigue leyendo Grupo de usuarios de R en Bogotá (R Users Group in Bogotá)
¿Cómo simular una regresión logística?
Durante el semestre que acaba de pasar, dirigí dos trabajos de grados que estaban relacionados con algunas propiedades de la regresión logística. De paso diré que la regresión logística me ha sorprendido por sus inesperadas propiedades (como por ejemplo ser robusta ante los diseños de muestreo complejos). En este periplo por las propiedades de este … Sigue leyendo ¿Cómo simular una regresión logística?
SQL en R (para usuarios de Mac y PC)
Existen varias formas de realizar consultas en R sirviéndose del SQL. Sin embargo, algunas librerías son más complicadas que otras. En mi corta percepción de este tema, puedo decir que la menos complicada es la librería sqldf, que no necesita interactuar con ningún motor de consulta como MySQL. Esto trae ventajas pues si MySQL ha … Sigue leyendo SQL en R (para usuarios de Mac y PC)