?`[[` and read the discussions of indexing in the Introduction to R document that comes with R. Also, find a way to predict the number of elements you will need as making this a habit will pay off big time when you work with large amounts of data:
L1<-vector( "list", N ) for (i in seq.int( N )) { L1[[i]] <-tableGrob( ... ) } PS Post using your email program "plain text" mode... HTML gets stripped anyway and that often leads to partial corruption of your message. Read the Posting Guide. On June 13, 2018 4:43:21 PM HST, Stats Student <stats.student4...@gmail.com> wrote: >Hi, I'm trying to generate tableGrobs in a loop, store them in a list >so I >can use it in a call to gtable_combine(). > >L1<-list() >for (i in seq( ... )) { > L1[i] <-tableGrob( ... ) >} > >gtable_combine(L1, along=1) > >On the assignment inside the loop, I get "number of items to replace is >not >a multiple of replacement length" which I'm guessing has to do with the >tableGrob object not "fitting" in the list but am not sure how to fix >it. > >Thanks in advance for any pointers. > > [[alternative HTML version deleted]] > >______________________________________________ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >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. -- Sent from my phone. Please excuse my brevity. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.