STEM Lessons for College Students

Matrix operations in R

Exploring a matrix’s parameters in r: colSums, rowSums, colMeans, rowMeans, cbind, rbind.

ColSums() returns the sum for each column in your data structure. The only argument you need to pass is your data.
Just as it was with colnames() and rownames(), and cbind() and rbind(), there is a corresponding rowSums() function in R, too. It returns the sum for each row in a matrix.

ColMeans() gives us the means for all columns in our matrix, and rowMeans() returns the averages of the rows in a matrix.

Follow us on YouTube:
https://www.youtube.com/c/365DataScience

Connect with us on our social media platforms:
Website: https://bit.ly/2TrLiXb
Facebook: https://www.facebook.com/365datascience
Instagram: https://www.instagram.com/365datascience
Twitter: https://twitter.com/365datascience
LinkedIn: https://www.linkedin.com/company/365datascience

Prepare yourself for a career in data science with our comprehensive program:
https://bit.ly/2XIOUSS

Get in touch about the training at:
support@365datascience.com

Comment, like, share, and subscribe! We will be happy to hear from you and will get back to you!

%d bloggers like this: