[R] automatically generate the output name of my "for" loops

B77S bps0002 at auburn.edu
Mon Jun 13 05:21:23 CEST 2011


?paste
something like...
paste (group, i, sep="_")



jiliguala wrote:
> 
> Hello R users, 
> 
> I am new to R and am having difficulty with the output name of my "for"
> loops. 
> 
> here is the problem:
> 
> 
> for (i in c(1:100))
> {
> the name of the groups <- which(k1$cluster==i)
> }
> 
> how can it automatically generate the name for 100 cluster(just like
> group_1, group_2...)? what should i put in the bold letter place?
> really thank you for helping me
> 
> Daniel
> 

--
View this message in context: http://r.789695.n4.nabble.com/automatically-generate-the-output-name-of-my-for-loops-tp3592160p3593123.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list