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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post by answerhappygod »

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?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply