[R] Creating named lists

2010-03-12 Thread Rune Schjellerup Philosof
I often find myself making lists similar to this list(var1=var1, var2=var2) It doesn't seem list has an option, to make it use the name of the variable as name in the list. Is there another function that does this? -- Med venlig hilsen Rune Schjellerup Philosof Ph.d-stipendiat

Re: [R] Creating named lists

2010-03-12 Thread Rune Schjellerup Philosof
) $a [1] 1 $b [1] 2 On Fri, Mar 12, 2010 at 5:28 PM, Rune Schjellerup Philosof rphilo...@health.sdu.dk wrote: I often find myself making lists similar to this list(var1=var1, var2=var2) It doesn't seem list has an option, to make it use the name of the variable as name

Re: [R] Creating named lists

2010-03-12 Thread Rune Schjellerup Philosof
debugging a pain. Erich Neuwirth wrote: If thats what you want, why don't you do list(a=1, b=2) On 3/12/2010 10:45 AM, Rune Schjellerup Philosof wrote: No, I mean this: a - 1 b - 2 list(a=a, b=b) I just find it anoying, that I have to type the names of the variables twice. I would

Re: [R] Creating named lists

2010-03-12 Thread Rune Schjellerup Philosof
[mailto:r-help-boun...@r-project.org] På vegne af Rune Schjellerup Philosof Sendt: 12. marts 2010 10:46 Til: Linlin Yan Cc: r-help@r-project.org Emne: Re: [R] Creating named lists No, I mean this: a - 1 b - 2 list(a=a, b=b) I just find it anoying, that I have to type the names

[R] outputting functions in lapply

2009-12-07 Thread Rune Schjellerup Philosof
How come the k is 3 in all of this output? I expected it to be equal to r. tmp3 - lapply(1:3, function(k) function(r) print(paste(r, - r | k -, k))) for (i in 1:3) { tmp3[[i]](i) } [1] 1 - r | k - 3 [1] 2 - r | k - 3 [1] 3 - r | k - 3 -- Med venlig hilsen Rune Schjellerup Philosof Ph.d

[R] Redblack tree data structure

2009-09-04 Thread Rune Schjellerup Philosof
I need to use a red-black tree, which package provides that data structure? -- Best regards Rune Schjellerup Philosof Ph.d-stipendiat, Forskningsenheden for Biostatistik Telefon: 6550 3607 E-mail: rphilo...@health.sdu.dk Adresse: J.B. Winsløwsvej 9, 5000 Odense C SYDDANSK UNIVERSITET

[R] eval parent.frame() twice

2009-08-07 Thread Rune Schjellerup Philosof
of 'a' from 'first' is returned? -- Regards Rune Schjellerup Philosof Ph.d.-studerende, Statistik, IST, SDU Telefon: 6550 3607 E-mail: rphilo...@health.sdu.dk Adresse: J.B. Winsløwsvej 9, 5000 Odense C __ R-help@r-project.org mailing list https

Re: [R] eval parent.frame() twice

2009-08-07 Thread Rune Schjellerup Philosof
Peter Dalgaard skrev: Rune Schjellerup Philosof wrote: Hi I want to use a function (update) that in its body uses eval(call, parent.frame()) I would like to use this function in a function that does not contain the variables referred to in 'call'. Those variables are instead

[R] multicore - shared memory

2009-03-18 Thread Rune Schjellerup Philosof
-on-write on the memory inherited from the master. So my question is: How do I allow the child threads to work on the variables base and smooth as shared memory, so that I don't have to use sendMaster or similar functions that copy the results? -- Med venlig hilsen Rune Schjellerup Philosof

[R] NAs are not allowed in subscripted assignments

2009-01-08 Thread Rune Schjellerup Philosof
on the rhs, so it should be allowed to have NAs in the lhs, according to help(Extract). What am I missing? I can see no ambiguite as to what the result of those commands should be (j == c(2,2,NA)). -- Med venlig hilsen Rune Schjellerup Philosof Videnskabelig Assistent, Statistik, SDU Telefon: 6550

[R] splinefun and interpSpline

2008-11-06 Thread Rune Schjellerup Philosof
On the splinefun help page it refers to the interpSpline function from the splines package. What are the differences in the results, other than splinefun returns a function and with interpSpline you use predict. The only difference from the help pages seems to be the deriv option of splinefun, are