title: Reshaping multiple variables in wide format to nodes and edges for network analysis
body: <p>I am having trouble preparing a dataset in R for network analysis. I have a set of ten non-mutually exclusive race/ethnicity dummy variables from survey data in a wide format of just over 150K responses (see R code below for sample data)</p>
  <pre><code>resp &lt;- 150000
  race_01 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_02 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_03 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_04 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_05 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_06 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_07 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_08 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_09 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  race_10 &lt;- rbinom(n=resp, size=1, prob = runif(1,min = 0, max = 1))
  dat &lt;- cbind(race_01, race_02, race_03, race_04, race_05, race_06, race_07, race_08, race_09, race_10)
  dat
  </code></pre>
  <p>Googling around, I haven't been able to find a method to transition this dataset to one of nodes and edges for network analyses. Any assistance or direction would be appreciated.</p>