Recently, i tried to transform a vector of data into normal distribution. I saw some researchers use z transform to normalize data, is there any R function can complete this transformation?
Please be aware that this does not "transform a vector of data into normal distribution". What z-transformation does is map data that is already normally distributed to the standard normal distribution (i.e., mean=0, sd=1). The normal distribution of the vector, however, is an assumption and not the consequence of the operation.
@Raúl nice, I didn't know that function. This greatly enhances readability.
Only one caveat: the scale function always returns a matrix even if you enter a vector. If you want the vector, you need to as.vector(scale(X, center=T, scale=T)).