Gracias Jesús.
Quoting Jesús Para Fernández <j.para.fernan...@hotmail.com>:
Con assing y un paste0
Mete dentro del bucle esto
for(i in 1:7){
assign(paste0('matriz',i),matrix(0,ncol=5,nrow=3))
}
Con eso generarias 7 matrices de 5x3, llamadas matriz1, matriz2,...
Obtener Outlook para Android<https://aka.ms/ghei36>
________________________________
From: R-help-es <r-help-es-boun...@r-project.org> on behalf of
Manuel Mendoza <mmend...@mncn.csic.es>
Sent: Friday, June 22, 2018 10:15:55 AM
To: r-help-es@r-project.org
Subject: [R-es] loop con matriz que cambia de nombre
Buenos días. Quiero hacer un for (j), anidado en otro for (i). En el
2º for, en cada iteración ha de crear una matriz vacía: mat <-
matrix(nrow=nrow(data),ncol=19) pero llamándola de forma distinta cada
vez. El nombre ha de ser: paste("D",i,colnames(Data[j]),sep=""). Llevo
un rato haciendo pruebas pero no me sale. A ver si alguien pudiera
ayudarme,
gracias,
Manuel
.
--
Dr Manuel Mendoza
Department of Biogeography and Global Change
National Museum of Natural History (MNCN)
Spanish Scientific Council (CSIC)
C/ Serrano 115bis, 28006 MADRID
Spain
_______________________________________________
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es
--
Dr Manuel Mendoza
Department of Biogeography and Global Change
National Museum of Natural History (MNCN)
Spanish Scientific Council (CSIC)
C/ Serrano 115bis, 28006 MADRID
Spain
_______________________________________________
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es