write a function that calculates the sample standard deviation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

write a function that calculates the sample standard deviation

jmmm
How to write a function that calculates the sample standard deviation i.e. sqrt(sum((x - mean(x))^2) / (n - 1))?,however Not allow to use built-in R function such as sum,meanmedian,sd,var or summary.
this function should have a single argument x.
Many thanks!