From 7e0c60004a66ff4a3ab6c389b310f3ee0daaab96 Mon Sep 17 00:00:00 2001 From: kkh451 Date: Wed, 27 Nov 2024 12:55:55 +0100 Subject: [PATCH] corrections: E02 --- episodes/02-data-structures-and-subsetting.Rmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/episodes/02-data-structures-and-subsetting.Rmd b/episodes/02-data-structures-and-subsetting.Rmd index 9b44860..3711f6c 100644 --- a/episodes/02-data-structures-and-subsetting.Rmd +++ b/episodes/02-data-structures-and-subsetting.Rmd @@ -576,15 +576,15 @@ _____(weather) # The correct data type is: ____________. # 4. Correct the 4th temperature data point with the mean of the two given values -weather$temp[4] <- -3.45 +weather$temperature[4] <- -3.45 # print the data again to see the effect weather # 5. Convert the temperature to the right data type -weather$temp <- ______________(weather$temp) +weather$temperature <- ______________(weather$temperature) # Calculate the mean to test yourself -mean(weather$temp) +mean(weather$temperature) # If you see the correct mean value (and not NA), you did the exercise # correctly! @@ -729,8 +729,8 @@ auto-complete function: Type "`as.`" and then press the TAB key. There are two functions that are synonymous for historic reasons: ``` -weather$temp <- as.double(weather$temp) -weather$temp <- as.numeric(weather$temp) +weather$temperature <- as.double(weather$temperature) +weather$temperature <- as.numeric(weather$temperature) ``` ::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::