0

My r markdown code

Above I have this matrix of data that I have built from a previous problem, the issue that I'm having is an error message for the code:

apply(X=X,MARGIN = 1,FUN = sum)

I am attempting to sum up each row in order to find a marginal probability distribution for the variable X. I'm curious what I'm doing wrong as I tried following an online tutorial and I should have matched the format. Thanks!

  • The image shows you dont have an object named `X`. Is it `f` i.e. `apply(f, 1, FUN = sum)` – akrun Oct 17 '20 at 20:43
  • wow, that was a shockingly easy answer right in front of my face. Thanks!!! Sincerely, an embarrased beginner. – Biostats_R Oct 17 '20 at 20:48

0 Answers0