Created
March 18, 2020 19:24
-
-
Save NyaGarcia/faf54a1e82016628c54387f72bff481e to your computer and use it in GitHub Desktop.
Calculating total values for columns with colSums()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> colSums(table(mtcars$gear, mtcars$cyl)) | |
4 6 8 | |
11 7 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment