Re: [R] R: LIST function and LOOPS

2005-03-12 Thread Uwe Ligges
Clark Allan wrote: hi thanx for the help. i dont want to use matrices. i solve my problem, see the example below. the set.seed is used because in my actual application i need to generate INDEPENDENT variables. will this ensure that the variables are independent? Why do you want to set.seed()

Re: [R] R: LIST function and LOOPS

2005-03-11 Thread Clark Allan
hi thanx for the help. i dont want to use matrices. i solve my problem, see the example below. the set.seed is used because in my actual application i need to generate INDEPENDENT variables. will this ensure that the variables are independent? z3-function(w) { for (i in 1:w) { ss-0

[R] R: LIST function and LOOPS

2005-03-10 Thread Clark Allan
hi all another simple question. i've written a dummy program so that you get the concept. (the code could be simplfied such that there are no loops. but lets leave the loops in for now.) z1-function(w) { for (i in 1:w) { set.seed(i+6) ss-0 for (j in 1:5) {

Re: [R] R: LIST function and LOOPS

2005-03-10 Thread Adaikalavan Ramasamy
You will need to capture the value of ss at the end of each 'i' as such z4 -function(w){ output - numeric(w) for (i in 1:w){ set.seed(i+6) # this is redundant line ss-0 for (j in 1:5){ set.seed(j+1+(i-1)*6) r-rnorm(1) ss-ss+r } output[i] -

[R] R list

2004-10-29 Thread Leonardo L Miceli
Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

RE: [R] R list

2004-10-29 Thread Robert Sams
names() is what you want, if i understand your question correctly. cheers, robert -Original Message- From: Leonardo L Miceli [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 3:22 PM To: [EMAIL PROTECTED] Subject: [R] R list Hi Is there any function to get the name

RE: [R] R list

2004-10-29 Thread Liaw, Andy
Yes, names(). Andy From: Leonardo L Miceli Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

Re: [R] R list

2004-10-29 Thread Giovanni Petris
What about names() ? Giovanni Date: Fri, 29 Oct 2004 11:21:35 -0300 From: Leonardo L Miceli [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Cc: Precedence: list Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML