I have a data.frame containing values I want to use as attributes in a network file.
When I try to assign the values as attributes manually half of them work but the other half show this error. I have looked closely at the data and I cannot see anything intrinsic that should be causing this.
Format vector input (this one works)
visitgo2n%v%"hhid" <- attr2$hhid
Here is the error:
"Error in set.vertex.attribute(x, attrname = attrname, value = value) :
Inappropriate value given in set.vertex.attribute."
I have tried removing white space but this does not work.
I have also tried entering the vectors in this way but I get the same error:
for (n in names(attr2)) {
visitgo2n %v% n <- attr2[[n]]
}
What could be causing half the vectors to be 'inappropriate', what values are appropriate?