title: Get an "Error in data.frame(..., check.names = FALSE) : row names contain missing values" when using R in Tableau
body: <p>I am using <a href="https://boraberan.wordpress.com/2014/06/28/dynamic-network-graph-layouts-in-tableau-using-r/" rel="nofollow noreferrer">this</a> guide to create a nework graph in Tableau 9.0.</p>
  <p>To do this, you call R to create calculated fields to plot the coordinates of the graph.</p>
  <p>When I load his sample workbook, it works just fine, but when I apply his formulas to my own data (even after structuring it exactly like his data), I get the following error:</p>
  <pre><code>Error in data.frame(..., check.names = FALSE) : row names contain missing values
  </code></pre>
  <p>If I understand correctly that is an error related to the cbind argument in the following snippet:</p>
  <pre><code>SCRIPT_STR(&quot;library(igraph); library(plyr);set.seed(123);
  mydf &lt;- data.frame(from=.arg1, to=.arg2, weight=.arg3, Order=.arg4);
  mydf &lt;-mydf[(mydf$Order=='1') &amp; (!is.na(mydf$to)),];
  mygraph &lt;- graph.data.frame(mydf);
  coords &lt;- &quot;+[Layout]+&quot;(mygraph, weights=E(mygraph)$weight);
  c&lt;-cbind(coords, data.frame(users=V(mygraph)$name));
  c&lt;-cbind(c, betweenness(mygraph));
  allusers &lt;- data.frame(users=.arg5);
  c&lt;-join(allusers, c, by = 'users');
  paste(c[,2],c[,3],c[,4], sep='~')&quot;,ATTR([LeadGame]),ATTR([WithGame]),SUM([BoughtTogether]),ATTR([PathOrder]), ATTR([AltGame]))
  </code></pre>
  <p>For those not familiart, the SCRIPT_STR in Tableau calls R through Rserve.  The ATTR([LeadGame])... at the very end defines the five args specified in the R code.</p>
  <p>Any ideas why this would work perfectly on his data, but produce the above error on mine?  again, the structure is the same, the numbers and names are just different.</p>