Press "Enter" to skip to content

Category: Open Science

How to Use Binder and R for Reproducible Research

In a previous post, we learned how to use Binder and Python for reproducible research. Now we are going to learn how to create a Binder for our data analysis in R, so it can be fully reproduced by other researchers. More specifically, in this post we will learn how to use Binder for reproducible research.

Many researchers upload their code for data analysis and visualization using git (e.g., to GitHub, Gitlab).

No doubt, uploading your R scripts is great. However, we also need to make sure that we share the complete computational environment so that our code can be re-run and so that others can reproduce the results. That is, to have a fully reproducible example, we need a way to capture the different versions of the R packages we were using, at that particular time.

How to Use Binder and Python for Reproducible Research

In this post we will learn how to create a binder so that our data analysis, for instance, can be fully reproduced by other researchers. That is, in this post we will learn how to use binder for reproducible research.

In previous posts, we have learned how to carry out data analysis (e.g., ANOVA) and visualization (e.g., Raincloud plots) using Python. The code we have used have been uploaded in the forms of Jupyter Notebooks.

For users of R Statistical Environment;

Although this is great, we also need to make sure that we share our computational environment so our code can be re-run and produce the same output. That is, to have a fully reproducible example, we need a way to capture the different versions of the Python packages we’re using.

OpenSesame Tutorial: How to use Image Stimuli

In this OpenSesame tutoria,l we will learn how to use images as stimuli and how to load the trials; including filenames, correct responses, and conditions from a pre-generated CSV file. To follow this tutorial you don’t need to know Python programming. However, we are going to generate the CSV file using a short Python script. This can be done manually, of course. See also this OpenSesame tutorial.

OpenSesame Tutorial – How to Create a Flanker Task

In this post you are going to learn how to create a simple experiment using the free experiment building software OpenSesame. As I have previously written about, OpenSesame, is an application, based on Python, for creating Psychology, Neuroscience, and Economics experiments. It offers a nice and easy to use interface.  In this interface you can drag-and-drop different objects. This means that you don’t have to know any Python programming at all to create an experiment. If you need to know how to use images as stimuli you can see this OpenSesame Tutorial.

How to create a psychology exeriment using OpenSesame

PsychoPy video tutorials

PsychoPy, as I have previously written about (e.g., Free and Useful Software and PsychoPy tutorial) is really a great Python tool for creating Psychology experiments. You can write Python code by either using  “code view” or import the package in your favourite IDE.  Furthermore, you can use the builder mode and just drag and drop different items and PsychoPy will create a Python Script for you.

If need inline scripts (in Python, of course) can be inserted. That is, you can combine drag-and-drop building with some coding.

In this post I have collected some tutorial videos that can be useful for someone unfamiliar with PsychoPy.

Every Psychologist Should Learn Programming

The aim of this post is to show you why you, as a psychology student or researcher (or any other kind researcher or student) should learn to program. The post is structured as follows. First I start with discussing why you should learn programming and then give some examples when programming skills are useful. I continue to suggest two programming languages that I think all Psychology students and researchers should learn.

R resources for Psychologists

Good resources for learning R as a Psychologist are hard to find. By that I mean that there are so many great sites and blogs around the internet to learn R. Thus, it may be hard to find learning resources that targets Psychology researchers.

Recently I wrote about four good R books targeted for Psychology students and researchers (i.e., R books for Psychologists). There are, however, of course other good resources for Psychological researchers to learn R programming.

Therefore, this post will list some of the best blogs and sites to learn R.  The post will be divided into two categories; general and Psychology focused R sites and blogs. For those who are not familiar with R I will start with a brief introduction on what R is (if you know R already; click here to skip to the links).

What is R?

R is a free and open source programming language and environment. Data analysis in R is carried out by writing scripts and functions. Finally, R is a complete, interactive, and object-oriented language.

"R

In R statistical environment you are able to carry out a variety of statistical and graphical techniques. For instance, linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, and many more can be carried using both frequentist and Bayesian paradigms.

You may want to start with R commander. It provides a menu which may make learning R a bit easier at the beginning. R can be downloaded here: The Comprehensive R Archive Network.

R Resources

One of the main things that I like with R is the broad and helpful community. This also means that there are many good resources for learning the language.

RStudio-like Python IDEs – Rodeo and Spyder

In this post I will discuss two Python Integrated Development Environments (IDE); Rodeo and Spyder. Both Python IDEs might be useful for researchers used to work with R and RStudio (a very good and popular IDE for R) because they offer similar functionalities and graphical interfaces as RStudio. That is, Rodeo and Spyder can both be seen as the RStudio for Python.