I'm trying to export a network I've built in igraph to a gexf format using rgexf so I can use it in Gephi. My basic code is below, plus then I have a few formatting things (removing labels and such) which I haven't included below.
df <- read.csv ("<file>", header = TRUE, sep = ",")
df.network <- graph.data.frame(df, directed=F)
V(df.network)$type <-bipartite.mapping(df.network)$type
plot(df.network, vertex.label.cex = 0.8, vertex.label.color = "black", layout=layout_with_kk, asp=0)
I then use the following
g1.gexf <- igraph.to.gexf(df.network)
but I get the following error message:
Input is not proper UTF-8, indicate encoding !
Bytes: 0xED 0x6E 0x20 0x46
Error: 1: Input is not proper UTF-8, indicate encoding !
Bytes: 0xED 0x6E 0x20 0x46
and g1.gexf isn't written. Can anyone help with what might have gone wrong?