Describe the bug
bipartite_projection() does not work if type vertex attribute not present, and remove.type is left at the default value of TRUE.
To reproduce
> g<-make_graph(c(1,2, 1,4, 2,3, 4,3), directed=F)
> bipartite_projection(g, types=c(T,F,T,F))
Error in delete_vertex_attr(res[[1]], "type") :
No such vertex attribute: type
> bipartite_projection(g, types=c(T,F,T,F), remove.type=F)
$proj1
IGRAPH f2a8bb7 U-W- 2 1 --
+ attr: weight (e/n)
+ edge from f2a8bb7:
[1] 1--2
$proj2
IGRAPH 94ba2d5 U-W- 2 1 --
+ attr: weight (e/n)
+ edge from 94ba2d5:
[1] 1--2
Version information
igraph 1.5.1