title: How to change the types of vertices of the first and second kind in bipartite graph?
body: <p><strong><em>I want to make a network of countries by co-participation in film production, but with my code, I have the reverse result (films by countries).</em></strong></p>
  
  <p>I read that "Bipartite graphs have a ‘type’ vertex attribute in igraph, this is boolean and FALSE for the vertices of the first kind and TRUE for vertices of the second kind." So, I think that I should change the types of vertices, but don`t know how.</p>
  
  <p>Unfortunately, the data is in the closed access, so it is impossible to download it, but the final matrix (a) has countries as columns and films ids as rows. I also tried to flip the df, but it didn`t help (the vertices in the graph were countries as I wanted, but there were no connections between them).</p>
  
  <pre><code>#I load df and make some changes with it 
    movies &lt;- read_csv("~/shared/mi_2018/data/movies.csv") %&gt;% 
    select(movie_id, production_countries)
    movies_with_countries = extract_json2(df = movies, col = "production_countries")
    a = spread(movies_with_countries, key = production_countries_sep, 
    value = production_countries_v)
    row.names(a) &lt;- a$movie_id
    a = a %&gt;% select(-movie_id, -production_countries)
    a[is.na(a)] &lt;- 0
  
   #Here I make a bipartite graph, but the result is reverse compared to what I expected
    bg = graph.incidence(a)
    V(bg)$type
    pr = bipartite.projection(bg)
    q = get.adjacency(pr$proj1,sparse=FALSE,attr="weight")
    plot(pr$proj1,edge.width=E(pr$proj1)$weight^2,edge.color="black",vertex.label=V(pr$proj1)$name)
  </code></pre>
  
  <p><strong><em>I expect the graph to represent the connection of countries by their co-participation in film production, but in the actual graph is about fils connected based on countries.</em></strong></p>