Re: [R] Looping and Pasting

2008-02-22 Thread Erik Iverson
See if the following helps you understand what you want. This won't work: get("m.1$medoids") But you can do get("m.1")$medoids lst1 <- list(a = 10, b = 20, c = 30) ##create a list get("lst1") ## gets whole objec get("lst1$a") ## does not work get("lst1")$a ## works get(paste("lst", 1, sep =

Re: [R] Looping and Pasting

2008-02-22 Thread Greg Snow
f Of Mark Orr > Sent: Friday, February 22, 2008 1:07 PM > To: r-help@r-project.org > Subject: [R] Looping and Pasting > > Hello R-community: Much of the time I want to use loops to > look at graphs, etc. For example, > > I have 25 plots, for which the names are m.1$medoid

[R] Looping and Pasting

2008-02-22 Thread Mark Orr
Hello R-community: Much of the time I want to use loops to look at graphs, etc. For example, I have 25 plots, for which the names are m.1$medoids, m.2$medoids, ..., m.25$medoids. I want to index the object number (1:25) as below (just to show concept). for (i in 1:25){ plot(m.i$medoids) } I've