Re: [R] Help me create a hyper-structure

From: Ben Bolker <bbolker_at_gmail.com>
Date: Mon, 18 Apr 2011 09:10:22 -0400

On 11-04-18 04:45 AM, Alaios wrote:
> It seems you were right.
> Now I can easily access my struct and substruct like this
>
> # all.str[[1]]] Gives access to the first struct of per.sr.struct which containts 101 times the xorder,yorder,estimation.sr
> # all.str[[1]][[2]] Gives access to the second substruct of all.str[[1]]
> # all.str[[1]][[2]][[3]] Gives access to the matrix.
>
> Now I would like to ask you if in R cran I can make struct assignments like this
>
>
> all.str[[i]]<-TempApproxstruct
>
>
> where all.str[[i]] is a list that contains 100 times the
> $ :List of 3
> ..$ xorder : int 0
> ..$ yoder : int 0
> ..$ estimation.sr: logi [1:256, 1:256] NA NA NA NA NA NA ...
> $ :List of 3
> ..$ xorder : int 0
> ..$ yoder : int 0
> ..$ estimation.sr: logi [1:256, 1:256] NA NA NA NA NA NA ...
> .... and so on
>
> where str(temp.per.sr.struct) is a list that contains 100 times the
> $ :List of 3
> ..$ xorder : int 0
> ..$ yoder : int 0
> ..$ estimation.sr: logi [1:256, 1:256] NA NA NA NA NA NA ...
> $ :List of 3
> ..$ xorder : int 0
> ..$ yoder : int 0
> ..$ estimation.sr: logi [1:256, 1:256] NA NA NA NA NA NA ...
> [list output truncated]
> ...and so on.
>
> Will R understand this kind of assignments or not?

  Why don't you just try it and see what happens ... ?



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 18 Apr 2011 - 13:16:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 13:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive