#### limpio mi ambiente de trabajo
rm(list = ls())
#network Baboon1bin Baboon grooming relations at t1 / binary
# Baboons H22A / binary
# aug 18, 1998
# binarized Baboon Grooming Network at T1
# vertices 12
lazos=c(0,1,0,1,1,0,0,0,0,0,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,1,1,0,0,1,1,1,
1,0,1,0,1,1,1,0,0,1,0,1,
1,0,1,1,0,1,0,1,0,0,0,0,
0,0,1,1,1,0,0,0,0,1,0,1,
0,0,1,1,0,0,0,1,0,0,0,0,
0,0,0,0,1,0,1,0,1,1,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,
0,0,1,1,0,1,0,1,0,0,0,0,
1,0,1,0,0,0,0,0,0,0,0,0,
1,0,1,1,0,1,0,0,0,0,0,0)
nombres=c("f1","m1","f2","f3","m2","f4","m3","f5","m4","f6","f7","m5")
B = matrix(lazos, nrow=12, ncol=12, byrow = TRUE)
#### nombres
colnames(B)<-nombres
rownames(B)<-nombres
B
class(B)
#### USA TU PROPIA RUTA #########################################################
RutaMac= "/Users/COLSON/Google Drive/AlanFiles/Colson/COLSON 2015/Temas Selectos"
RutaMac
setwd(RutaMac)
getwd()
##### necesito el paquete
library(foreign)
write.csv(B, file="baboons.csv")