Is there a way to refer to the row sums and column sums whenusing the addmargins function in R?
For example, here is a matrix cmat2 with its row and column sumscreated using
addmargins(cmat2, FUN = sum) 1 0 sum1 78 71 149 = sum[1,2} ???0 71 1743 1814sum 149 1814 1963
How to do?
Is there a way to refer to the row sums and column sums when using the addmargins function in R? For example, here is a
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Is there a way to refer to the row sums and column sums when using the addmargins function in R? For example, here is a
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!