I do have a directed network with a lot of NA's for a couple of "targets". The original dataframe "df2_net" looks like...
from to Attribute
<int> <int> <int>
5 NA 12120
6 NA 12210
3 NA 12300
6 NA 12310
5 6 12310
3 5 12310
if I generate the network in a straight forward way:
g <- graph.data.frame(df2_net, directed = T)
I get the error: In graph.data.frame(df2_net, directed = T) :
In d' NA' elements were replaced with string "NA"
I don't want to just clean things up (df2_net_clean <- na.omit(df2_net)
)
I would rather want to have the NA's as a kind of self-loop for the "from" variables.