Interval and ratio variables in R
R has no special way of dealing with interval and ratio variables. In fact, it's not necessary because you can just use plain old numeric values.
This exercise is part of the course
Intro to Statistics with R: Introduction
Exercise instructions
Review the examples in the script. The first example creates an interval variable called longitudes
containing a vector of longitudes. The second example creates a ratio variable called chronos
containing the times it takes for an athlete to run 100 meters.
Click "Submit Answer" once you understand how interval and ratio variables are expressed in R.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create an interval variable called longitudes
longitudes <- c(10, 20, 30, 40)
# Create a ratio variable called chronos
chronos <- c(10.60, 10.12, 9.58, 11.1)