Kategori: R-statitsics

  • Pipes in R

    I started using R long before RStudio were a thing. In fact, the reason I started to use Emacs was because of ESS (Emacs Speaks Statistics). Emacs was a so to say IDE for R statistics. If i hade started using RStudio I may not have started using Emacs. When I started using R Dplyr…

  • 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: unemployment.rate <- c(0.01, 0.17, 0.19, NA, 0.21, 0.14, 0.02,NA, 0.26, 0.27, 0.21, 0.28, 0.23, 0.16, 0.1, NA, 0.23, 0.03, 0.11) cntry <- c (”SE”, ”NO”, ”DK”, ”SE”, ”NO”, ”SE”, ”DK”, ”DK”, ”NO”, ”DK”, ”SE”, ”DK”, ”DK”, ”SE”, ”DK”, ”SE”, ”SE”, ”DK”, ”NO”) size <- c(”Big”,”Medium”,”Big”,”Big”,”Medium”,”Small”,”Big”,”Medium”,”Medium”,”Big”,”Small”,”Medium”,”Medium”,”Big”,”Medium”,”Big”,”Big”,”Big”,”Small”) df <- data.frame(unemployment_rate,…

  • 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…