Analyzing cognitive data using R

Mario E. Bermonti-Pérez, PhD, MA

Intro

https://github.com/mario-bermonti/talks

Agenda

  • Why code?
  • Objectives
  • Why Mario offering this workshop?
  • Setting up environment
  • Basic test
  • Hands-on coding
  • Questions, feedback, next steps

Why code?

  • You can make the computer do what you want!
  • That is really, really cool! 😍
  • That should be enough, but let’s go deeper…
  • Reproducibility
  • Collaboration
  • Automatize repetitive things
  • Think more carefully about data
  • Coding-based analysis has many more tools and options

Objectives

  • Feel confident that you can learn to analyze data using R
  • Identify the basic concepts of R
  • Use the posit cloud platform to run R code
  • Identify quarto’s basic functionality

Why Mario?

  • Cognitive and behavioral scientist
  • Analyzes quantitative data daily
  • Extensive experience using R, python, quarto, and other data analysis and programming tools
  • Passionate about reproducibility and open science
  • Passionate about software development
  • Teaches data analysis and programming to graduate students

Setting up the environment

Create account

Create a new project

  • Press New Project
  • Select New RStudio Project (will take a minute)

Create a Quarto document

  • Press +
  • Press Quarto Document
  • Give it a name
  • Press Create

Quick test

  • Switch to source mode by pressing Source
  • Render document by pressing Render
  • Install packages by pressing install
  • Render document again
  • Clap when you see the rendered document 🥳
  • On your way to be a coder! 🚀

Clean document

Delete everything below the 5th line

Hands-on coding

Here comes the good stuff 💻🤓

  • Read data
  • Inspect data
  • Visualize data
  • Summarize data
  • Perform inferential statistics

Discussion

  • How was it?
  • What did you like the most?
  • What was most challenging?

Next steps

Materials