Content
- Calling functions Functions are R's tools: they receive arguments, return a result and can be nested inside each other. Programming with R
- Exercise: The weekly shop A receipt as vectors: you work out the total, count expensive items and deal with a price that is missing from the receipt. Programming with R
- Exercise: What does the milk cost per year? A household drinks milk every week: with names and functions you work out what that costs per year and how much switching brands saves. Programming with R
- Geh aufs Ganze: the game on television A clip from the German game show “Geh aufs Ganze” from 1994, the German version of “Let's Make a Deal”: three gates, one car, and the question whether to stick with your choice. Research questions and design
- Giving values a name With the arrow <- you store a result under a name and keep calculating with the name; plus the rules for good names. Programming with R
- Let's Make a Deal: 100 games with three doors Where was the car, which door did the contestant pick, which did the host open, and did the contestant stay or switch? A small, clean data set for the first steps with vectors and tibbles. Getting and tidying dataProgramming with R
- Missing values NA stands for a value nobody knows. Why every calculation with it gives NA again, how to find missing values and when to leave them out. Programming with RData criticism and pitfalls
- Numbers, text and logical values Every vector has a type: number, text or logical value. How to recognise it, why a vector can have only one type and how to convert. Programming with R
- Products from the REWE online shop A good 9,400 groceries and drugstore items with price, category, origin, organic label and nutrition values: real data with gaps, duplicates and a few values that cannot be right. Getting and tidying dataExploring and describingData criticism and pitfalls
- R as a calculator Your first contact with R: calculating, using brackets, dividing into whole numbers and writing comments, right in the browser. Programming with R
- Self-assessment: Exploratory data analysis with R Thirteen tasks on real product data: getting an overview, transforming, visualising and looking closely. This is how you check whether you are ready for exploratory data analysis. Exploring and describingTransforming dataVisualising
- The game with three doors Three doors, one car, two goats: play the guessing game yourself, decide to stay or switch, and take your rounds with you as R code, CSV or RDS. Research questions and design
- Types of variables What an observation and what a variable is, which four scales of measurement there are and what you may compute with each, and how R records the scale of a column with numbers, text and factors, shown on the game with three doors and the milk survey. Research questions and designProgramming with R
- Vectors In R almost everything is a vector, a series of values: how to build them, calculate with them, pick out single values, compare them and count with the result, using the game with three doors. Programming with R
-
Vectors and data frames
How R holds data: vectors of exactly one type, comparing and picking position by position, missing values and factors, the data frame as a list of equally long vectors and the
tibbleas the table of thetidyverse, shown on the game with three doors. Programming with R - What should we measure? An empty table for the rounds played: add variables as columns, give them a data type, enter each game as a row, and save everything as a CSV or RDS file for R. Research questions and design
Nothing matches. Fewer filters or another word will help.