Standardize data columns in R

I have a dataset called spam which contains 58 columns and approximately 3500 rows of data related to spam messages.

I plan on running some linear regression on this dataset in the future, but I’d like to do some pre-processing beforehand and standardize the columns to have zero mean and unit variance.

I’ve been told the best way to go about this is with R, so I’d like to ask how can i achieve normalization with R? I’ve already got the data properly loaded and I’m just looking for some packages or methods to perform this task.

16 Answers
16

Leave a Comment