Created
February 20, 2012 23:47
-
-
Save pedroj/1872360 to your computer and use it in GitHub Desktop.
Bulk read network data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################################################# | |
| # Network analyses. | |
| # Pedro. 7 Dec 2007 | |
| ################################################################# | |
| # NOTE: These matrices have rows are animals, columns are plants. | |
| # NOTE: JORDI's datasets for NESTEDNESS have Rows are plants, | |
| # columns are animals. | |
| library(bipartite) | |
| library(networksis) | |
| library(igraph) | |
| library(sna) | |
| library(network) | |
| library(netZ) | |
| library(brainwaver) | |
| library(Rgraphviz) | |
| library(DAAG) | |
| #---------------------------------------------------------------- | |
| getwd() | |
| [1] "/Users/pedro/Documents/Working/MS_Networks/Fitting" | |
| #---------------------------------------------------------------- | |
| # Read 0/1 matrices - No headers | |
| # IMPORTANT NOTE: rows are animals; columns are plants. | |
| ### Datasets-Pollination ----------------------------------------- | |
| abis<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/abis.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| acor<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/acor.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| cep1<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/cep1.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| cep2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/cep2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| cep3<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/cep2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| dona<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/dona.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| gala<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/gala.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| gara<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/gara.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hes1<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/hes1.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hes2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/hes2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hes3<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/hes3.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hock<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/hock.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| ino1<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/ino1.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| ino2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/ino2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| kaku<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/kaku.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| kat1<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/kat1.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| kat2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/kat2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| kato<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/kato.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| keva<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/keva.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| maur<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/maur.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| mosq<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/mosq.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| perc<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/perc.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| peta<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/peta.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| pri1<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/pri1.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| pri2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/pri2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| pri3<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/pri3.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| rami<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/rami.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| sche<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/sche.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| zack<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/poll/zack.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| ### Datasets-Frugivory ----------------------------------------- | |
| nch<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/nch.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| nch_lab<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/nch_lab.txt",header=T,sep="\t",dec=",",na.strings="NA") | |
| mont<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/mont.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| sgen2<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/sgen2.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hr<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/hr.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| hrqt<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/hr_qt.txt",header=T,sep="\t",dec=".",na.strings="NA") | |
| hr_lab<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/hr_lab.txt",header=T,sep="\t",dec=",",na.strings="NA") | |
| wyth<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/wyth.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| beeh<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/beeh.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| vis<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/vis.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| frost<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/frost.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| guit<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/guit.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| nnog<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/nnog.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| nnog_lab<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/nnog_lab.txt",header=T,sep="\t",dec=",",na.strings="NA") | |
| interv<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/interv.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| interv_new<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/interv_new.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| crome<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/crome.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| lamb<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/lamb.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| snow<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/snow.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| snow_wyth<-read.table("/Users/pedroj/Documents/Working/MS_Networks/Fitting/matrices/frug/snow_wyth.txt",header=F,sep="\t",dec=",",na.strings="NA") | |
| ### Pooled datasets: | |
| pollmat<-list(kat1=kat1, | |
| cep1=cep1, | |
| acor=acor, | |
| cep1=cep1, | |
| cep2=cep2, | |
| cep3=cep3, | |
| dona=dona, | |
| gala=gala, | |
| gara=gara, | |
| hes1=hes1, | |
| hes1=hes1, | |
| hes2=hes2, | |
| hes3=hes3, | |
| hock=hock, | |
| ino1=ino1, | |
| ino2=ino2, | |
| kaku=kaku, | |
| kat1=kat1, | |
| kat2=kat2, | |
| kato=kato, | |
| keva=keva, | |
| maur=maur, | |
| abis=abis) # check | |
| frugmat<-list(nch=nch, | |
| mont=mont, | |
| snow=snow, # check | |
| crome=crome, | |
| wyth=wyth, | |
| sgen2=sgen2, | |
| beeh=beeh, | |
| vis=vis, | |
| frost=frost, | |
| guit=guit, | |
| nnog=nnog, # check | |
| nnog_lab=nnog_lab, # check | |
| interv=interv, | |
| lamb=lamb, | |
| snow_wyth= snow_wyth, | |
| interv_new= interv_new, | |
| hr=hr, | |
| hrqt=hrqt, | |
| hr_lab=hr_lab) | |
| #----------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment