R

Calculate row sums and col means with tidyR

Recently Someone asked a question on reddit: Adding a row and a column that are means for a set matrix This is a very simple problem that many of us learned how to do only a few hours in to basic R. But since I’ve been learning tidyverse package, I figured why not do it tidy-fashion? Let’s give it a try. Here is the question: I have the following sequence: