going on with my studies I am struggling to find a way to create incidence matrices. I found that "solution" how-can-i-create-an-incidence-matrix-in-julia but I do neither fully understand nor is the solution still operable
If we have some simple Dataframe like
df = DataFrame(Lines = (1:20), From = rand(1:10,20), To = rand(1:10,20))
Now I would like to convert that Dataframe into an incidence matrix consisting only of "0", "1" (Starting Point), and "-1" (Endpoint). It should look like this (except their should be 1 and -1 in the matrix...but i do not how to do so...)
Thanks for your help!

