Closed Reb75 closed 6 months ago
looking at closed issues.... try adding the following to your initial setup...
dim( as.matrix( PaulRevereNet ) )[1]
I did that, which gave me 254. However, when I add the rest of the code to get L,M, and N, and then attempt to get my density, I am still getting the same error code.
Hi @Reb75! Thanks @CGUEVARR for helping. @Reb75, you need to add the code that @CGUEVARR suggested to the rest of your script. The issue is that you need to have an object of class matrix
for the dim()
and sum()
functions. You can do that two ways.
PaulRevereNet <- as.matrix( PaulRevereNet )
and then use the PaulRevereNet
object in the functions. as.matrix()
function as suggested by @CGUEVARR to coerce the object.Got it to work now, thank you for your help!
@Reb75 awesome! And thanks @CGUEVARR again for helping!
When I put in the code to find the number of actors and events (N and M) it gives me a Null in the environment. When I attempt to find density, it gives me the error code "Error in L/(N*M): non-numeric argument to binary operator."