Re: [R] Source code of rnorm, where can I find it?

2011-02-02 Thread Waclaw Kusnierczyk
On 02/02/2011 01:50 PM, Ista Zahn wrote: .Internal functions such as rnorm cannot be retrieved in this way as far as I know. You may have to download the source and find it direclty. In this particular case you can find the implementation of rnorm with grep -rn --include=*.c '"rnorm"' .

Re: [R] "each" argument in rep (Bug?)

2011-02-01 Thread Waclaw Kusnierczyk
On 02/01/2011 05:16 PM, Phil Spector wrote: > In what way is the behavior non-consistent? Quoting from > the help page for rep: > > ¡times¢ A vector giving the number of times to repeat each > element if of length ¡length(x)¢, or to repeat the whole > vector if of lengt

Re: [R] help

2011-02-01 Thread Waclaw Kusnierczyk
On 02/01/2011 05:12 PM, David Winsemius wrote: On Feb 1, 2011, at 3:51 PM, Kiogou Lydie wrote: Yet, j! will stop at 170 and Π (i-1-d) at 172; so, a[j] will not exceed 170. I would like to have at least 200 a[j]. > factorial(200) [1] Inf Warning message: In factorial(200) : value out of rang

Re: [R] dataframe: string operations on columns

2011-01-18 Thread Waclaw Kusnierczyk
On 01/18/2011 07:05 PM, Henrique Dallazuanna wrote: > Or: > > read.table(textConnection(as.matrix(df)), sep = " ") no, that's too simple: you can't use regular expressions. (well, i guess it's enough for the original problem.) vQ > > > On Tue, J

Re: [R] dataframe: string operations on columns

2011-01-18 Thread Waclaw Kusnierczyk
Assuming every row is split into exactly two values by whatever string you choose as split, one fancy exercise in R data structures is dfsplit = function(df, split) as.data.frame( t( structure(dim=c(2, nrow(df)), unlist(