Kategori: R-statitsics

  • Pipes in R

    I started using R long before RStudio were a thing. In fact, the reason I started to useEmacs was because of ESS (Emacs Speaks Statistics). Emacs was a so to say IDE for Rstatistics. If I had started using RStudio I may not have not been using Emacs at all now.When I started using R…

  • Perceptions of Class Conflicts

    In this blog post I will investigate peoples perception of class conflicts in Sweden between 1992 and 2009. The data I am going to use is International Social Survey Project (ISSP). The data is free to download — but you need to register. Data can be found here: https://www.gesis.org/en/issp/home. To investigate class conflicts is interesting…

  • Ave-command i R statistics

    Imaging you have some data on unemployment: In the data we have some NA. We want to replace these based on the mean of cntry. This can be done using the ave-command (from R-base):  We can actually base the new data on both the mean from cntry and the mean from size. Amazing!

  • Family Orientation in eight countries — a moment with R

    In the last post I investigated the development of individualism in several countries, with the aim to investigate if individualism is something recent in Sweden. I used an indicator which I am rather sceptical about — the relation between importance of friends and family. The more important friends are related to the family the more…

  • The development of individualism — a moment with R

    I recently read a book about the education system in Sweden (”Glädjeparadoxen” [The paradox of Happiness]). The book is indeed interesting, dealing with the question why Swedish pupils has fallen behind in the big international tests such as PISA. However, it was another thing I found interesting. It is well known that the Swedish society…

  • How to get R up and running in Fedora Linux

    It is trivial to install R in Fedora. Just type: sudo dnf install R After that you can run R in the terminal. If you want an environment to work in you can use RStudio. I use Emacs and ESS. Everything works nice up until the point you want to install a package — say…

  • R-codes

    I just, for fun, made a site to publish some handy R-codes. I have just ordered them alphabetical order. Some of the codes I don’t use anymore. Here they are anyway!

  • Reading rather big data into R

    Reading big data into R can take some time, since R reads the data directly into the Ram-memory. If the data is big it can even happen that R crashes. Things has become better, but this is still a problem. I have 16 GB in Ram and seldom have so big data that it does…

  • From results in R to table in MS Word

    I have uploaded a video on how you can transform results from R into tables in MS Word. Maybe not the nicest way — but working without to much work.

  • Problems with GCC/gfortran in R statistics

    I updated my system recently and went into a problem when loading some of the packages dependent on GCC. The error message I got when for example running library(psych) was: ’/home/daniel/R/x86_64-redhat-linux-gnu-library/3.4/mnormt/libs/mnormt.so’: libgfortran.so.4: cannot open shared object file: No such file or directory The reason to the problem is that my GCC was updated to version…