[R] create structs in R.
Alaios
alaios at yahoo.com
Sat May 14 13:28:29 CEST 2011
Dear all,
so far when I want to create a struct with a substructs I create.
Lists with sublists by using functions and replicate.
This will end up in to a struct that is addressed like that
for (i in c(1:100){
for (j in c(1:100){
Mystruct[[1]][[2]][[1]][[i]][[k]]<-dosomething()
}
}
It is not hard for one to understand that this form for addressing subfields of the struct [[1]][[2]][[1]]... and so on, make hard to track which field of the strut you are addressing to. Even worse when I open my code after one week I usually take some time to understand which field I wanted to address.
Is there something more easier that I can do to face both these types of problem?
I would like to thank you in advance for your help
Best Regards
Alex
More information about the R-help
mailing list