Here you find the exercise sheet for chapter 1: “Getting Started”
Use R to do the following calculations:
\(5 + 3 = ?\)
\(3 - 8 = ?\)
\(5 * 7 = ?\)
\(9 : 6 = ?\)
\(7^2 = ?\)
\(exp(5) = ?\)
\(log(9) = ?\)
\(5,56 + 4,73 = ?\)
Assign a variable x the value of 5 and a variable y the value of 3.
Create the variable z as the product of x and y and in a next step check the value of z.
Run the code line below:
# Run
w <- ((((25*(-13))/0.753))^2)*(-0.000466)
Use logical operators to check the following things:
Create a vector that contains the numbers 21, 28, 31, 23 and 45 and call this vector bmi.
Create a vector that contains the words “subject_1”, “subject_2”, “subject_3”, “subject_4” and “subject_5” and call this vector names.
Check the types of the bmi and names vector.
Combine the two vectors names and bmi in a list and call this list bmi_data. Check out the content of this list by calling it.