swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.32k stars 7.24k forks source link

R Programming / Functions: introduce sd() function before using it #420

Open chsk-uk opened 5 years ago

chsk-uk commented 5 years ago

In the "Functions" section of the "R programming" course, the user is asked to write a function that takes both another function and data as its arguments, and returns the result of applying said function to said data. The user is then asked to use this to compute the standard deviation of a given vector:

Let's take your new evaluate() function for a spin! Use evaluate to find the standard deviation of the vector c(1.4, 3.6, 7.9, 8.8).

However, the R function used to compute the standard deviation of the vector hasn't been introduced in the "R programming" course yet.

Suggestion: either introduce the sd() function in a previous lesson or step, or explicitly tell the user which function to use in this step.

ranamahmud commented 5 years ago

Hello I'm interested to do the task of introducing sd() function.