Problem with plotweb R - interaction networks

Asked

Viewed 24 times

1

I need to structure in R a network of interactions, but every time I want to plot the graph, this error appears:

 # 3. Leitura da rede quantitativa
 read.delim("C:/Users/almei/Dropbox/Thays/TCC/matriz para o R 1.txt", row.names=1)
                                         Aves               X.1                   X.2
Plantas                    Brotogeris_chiriri Brotogeris_tirica Camptostoma_obsoletum
Anacardium_occidentale                      0                 0                     0
Acnistus_arborescens                        0                 0                     0
Tapirira_guianensis                         0                 0                     0
Allophylus_edulis                           0                 0                     0
Araucaria_angustifolia                      0                 1                     0
Astronium _urundeuva                        1                 0                     0
Berberis_laurina                            0                 0                     0
Blepharocalyx_salicifolius                  0                 0                     0
Byrsonima_sericea                           0                 0                     0
Carica_papaya                               0                 1                     0
Campomanesia_xanthocarpa                    0                 0                     0
                                          X.3              X.4                    X.5
Plantas                    Chlorophanes_spiza Coereba_flaveola Colaptes_melanochloros
Anacardium_occidentale                      0                0                      0
Acnistus_arborescens                        0                1                      0
Tapirira_guianensis                         0                0                      0
Allophylus_edulis                           0                0                      0
Araucaria_angustifolia                      0                0                      0
Astronium _urundeuva                        0                0                      0
Berberis_laurina                            0                0                      0
Blepharocalyx_salicifolius                  0                0                      0
Byrsonima_sericea                           0                0                      0
Carica_papaya                               0                0                      0
Campomanesia_xanthocarpa                    0                0                      0
                                      X.6                 X.7                   X.8
[ reached 'max' / getOption("max.print") -- omitted 92 rows ]

library(bipartite)
plotweb("matriz para o R 1.txt")
Error in colSums(web) : 'x' must be an array of at least two dimensions

  • 2

    What you are doing is reading the data but not creating a data.frame, not assigning it to an object. Try dados <- read.delim(etc) followed by plotweb(dados).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.