Find The Standard Deviation For A Vector, Matrix, Or... - R
Maybe your like
| SD {psych} | R Documentation |
Find the Standard deviation for a vector, matrix, or data.frame - do not return error if there are no cases
Description
Find the standard deviation of a vector, matrix, or data.frame. In the latter two cases, return the sd of each column. Unlike the sd function, return NA if there are no observations rather than throw an error.
Usage
SD(x, na.rm = TRUE) #deprecatedArguments
| x | a vector, data.frame, or matrix |
| na.rm | na.rm is assumed to be TRUE |
Details
Finds the standard deviation of a vector, matrix, or data.frame. Returns NA if no cases.
Just an adaptation of the stats:sd function to return the functionality found in R < 2.7.0 or R >= 2.8.0 Because this problem seems to have been fixed, SD will be removed eventually.
Value
The standard deviation
Note
Until R 2.7.0, sd would return a NA rather than an error if no cases were observed. SD brings back that functionality. Although unusual, this condition will arise when analyzing data with high rates of missing values. This function will probably be removed as 2.7.0 becomes outdated.
Author(s)
William Revelle
See Also
These functions use SD rather than sd: describe.by, skew, kurtosi
Examples
data(attitude) apply(attitude,2,sd) #all complete attitude[,1] <- NA SD(attitude) #missing a column describe(attitude) [Package psych version 1.7.8 ]Tag » How To Find Standard Deviation In R
-
Standard Deviation In R: How To Use Sd() In R - R-Lang
-
How To Find Standard Deviation In R? - DigitalOcean
-
Standard Deviation | R Tutorial
-
How To Calculate Standard Deviation In R - ProgrammingR
-
How To Find Standard Deviation In R? - GeeksforGeeks
-
[PDF] The Average And SD In R - Carlisle Rainey
-
How Can I Calculate Standard Deviation (step-by-step) In R?
-
R - Mean And Standard Deviation - YouTube
-
How To Find Standard Deviation On R Easily - Uedufy
-
Get Standard Deviation Of A Column In R - DataScience Made Simple
-
Methods To Calculate Standard Deviation In R - EduCBA
-
Standard Deviation - R
-
How To Calculate Standard Deviation In R (With Examples)
-
R: Sample Variance And SD - InfluentialPoints