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!