Re: [R] normality testing with nortest

2006-05-22 Thread Raymond Wan
Hi Rolf, On Sun, 21 May 2006, Rolf Turner wrote: I don't know from the nortest package, but it should ***always*** be the case that you test hypotheses ... If the nortest package does it differently (and I don't really see how it possibly could!) then it is confusingly designed. I rather

Re: [R] odd feature

2006-05-22 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Sun, 21 May 2006 09:47:07 -0400 writes: Gabor If you know that test is a scalar Gabor result - if (test) a else b Gabor will do it. Yes, indeed! IMO, ifelse(test, a, b) is much overused where as if(test) a else b is

Re: [R] normality testing with nortest

2006-05-22 Thread Uwe Ligges
Rolf Turner wrote: I don't know from the nortest package, but it should ***always*** be the case that you test hypotheses H_0: The data have a normal distribution. vs. H_a: The data do not have a normal distribution. So if you get a p-value 0.05 you can say that

Re: [R] How can you buy R?

2006-05-22 Thread Berwin A Turlach
G'day Deepayan, DS == Deepayan Sarkar [EMAIL PROTECTED] writes: DS let me first summarize this sub-discussion so far: [...] Sound like a perfect summary. :) DS As far as I can tell (and please correct me if I'm wrong), DS your contention is that by linking a GPL component P with a

Re: [R] nls fitting

2006-05-22 Thread Joerg van den Hoff
Lorenzo Isella wrote: Dear All, I may look ridiculous, but I am puzzled at the behavior of the nls with a fitting I am currently dealing with. My data are: x N 1 346.4102 145.428256 2 447.2136 169.530634 3 570.0877 144.081627 4 721.1103 106.363316 5 894.4272

Re: [R] normality testing with nortest

2006-05-22 Thread Raymond Wan
On Mon, 22 May 2006, Uwe Ligges wrote: Rolf Turner wrote: If the nortest package does it differently (and I don't really see how it possibly could!) then it is confusingly designed. I rather suspect that its design is just fine, and that it does what it should do. I suspect so as well. If

Re: [R] normality testing with nortest

2006-05-22 Thread Uwe Ligges
Raymond Wan wrote: On Mon, 22 May 2006, Uwe Ligges wrote: Rolf Turner wrote: If the nortest package does it differently (and I don't really see how it possibly could!) then it is confusingly designed. I rather suspect that its design is just fine, and that it does what it should do.

[R] How to reference R in papers?

2006-05-22 Thread j.joshua thomas
Dear List, How do i reference R 2.3.0 in research papers? JJ --- -- Lecturer J. Joshua Thomas KDU College Penang Campus Research Student, University Sains Malaysia [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

Re: [R] How to reference R in papers?

2006-05-22 Thread Christian Ritz
Hi JJ, try the following function in R: citation() Christian __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Unreadable labels -- in x11() and derivative

2006-05-22 Thread Martin Maechler
Maciej == Maciej Bliziński [EMAIL PROTECTED] on Sun, 21 May 2006 14:48:13 +0200 writes: Maciej Playing around with examples from MASS4, I found a font problem in the Maciej mosaicplot in R-2.3.0. It doesn't happen in other plots. Running this Maciej example from MASS4, page

[R] How to contribute improved documentation {was .. lm.predict ..}

2006-05-22 Thread Martin Maechler
Larry == Larry Howe [EMAIL PROTECTED] on Sat, 20 May 2006 15:10:09 -0400 writes: An optional data frame in which to look for variables with which to predict. means almost nothing to me. Specifically it doesn't translate to me, as an engineer and software developer, but not

[R] Matrix in 3D

2006-05-22 Thread robert-mcfadden
Dear R Users, Is it possible to add another (third) index to matrix (as in MATLAB). For some analysis e.g. finite mixture models is necessary. Simple example i-3 matrix[, , i]-matrixA[, ,i]%*%matrixB[, , i] I would appreciate any help Rob __

[R] random generation of a factor

2006-05-22 Thread Christian Bieli
Hi everybody Does anybody know a function that generates a factor of length N with K levels given the proportions c(p1, p2,... ,pk)? It would not be too hard to write it for myself, but if there's a preexisting one.. I searched the documentation and the help archive, but could not find

Re: [R] Matrix in 3D

2006-05-22 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Dear R Users, Is it possible to add another (third) index to matrix (as in MATLAB). For some analysis e.g. finite mixture models is necessary. Simple example i-3 matrix[, , i]-matrixA[, ,i]%*%matrixB[, , i] See ?array Uwe Ligges I would appreciate any help

[R] how to vectorize a matrix

2006-05-22 Thread Lorenzo Bencivelli
The help documentation suggests to use the command “stack”. Either it does not work or i did not understand well how to manage it. I need to vectorize the columns of a matrix in a certain order, any suggestion (or explanation on the command “stack”)? Thanks in advance. L

[R] SUSE 10.1 64 bit binary

2006-05-22 Thread Daniel Brewer
Hi, I was just wondering if anyone had created a 64 bit binary for SUSE 10.1 x86_64 yet. Unfortunately, I upgraded before looking whether a package was available and now cannot find a suitable package on CRAN. If noone has produced one yet, does anyone have any idea when one will be available?

Re: [R] Matrix in 3D

2006-05-22 Thread Robin Hankin
Hi there are dozens of examples of this kind of thing in the R-and-octave.txt file, in the contributed docs section of CRAN. See the multidimensional arrays section, near the bottom, for reproduction of all of matlab/octave's array handling capabilities. best wishes Robin On 22 May 2006,

Re: [R] how to vectorize a matrix

2006-05-22 Thread Christian Ritz
Hi Lorenzo, maybe the following example is of use? a - matrix(1:25,5,5) stack(as.data.frame(a[, c(1,3,5,2,4)])) Note that 'stack' takes a data frame or list as first argument (not a matrix). Therefore the matrix is first converted to a data frame using 'as.data.frame'. Christian

Re: [R] normality testing with nortest

2006-05-22 Thread Peter Dalgaard
Uwe Ligges [EMAIL PROTECTED] writes: A = 0.1846, p-value = 0.9059 ad.test(rnorm(100,mean=5,sd=3)) ... A = 0.5138, p-value = 0.1887 I mistakenly had thought the p-values would be more stable since I am artificially creating a random normal distribution. Is this expected

Re: [R] determination of number of entries in list elements

2006-05-22 Thread botto
Hi, thanks you all a lot for the quick reply. regards Benjamin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] SUSE 10.1 64 bit binary

2006-05-22 Thread Peter Dalgaard
Daniel Brewer [EMAIL PROTECTED] writes: Hi, I was just wondering if anyone had created a 64 bit binary for SUSE 10.1 x86_64 yet. Unfortunately, I upgraded before looking whether a package was available and now cannot find a suitable package on CRAN. If noone has produced one yet, does

Re: [R] Matrix in 3D

2006-05-22 Thread robert-mcfadden
Thank you very much you Robin and Uwe. Od: Robin Hankin [EMAIL PROTECTED] Do: Uwe Ligges [EMAIL PROTECTED] Data: 22 maja 2006 11:04 Temat: Re: [R] Matrix in 3D Hi there are dozens of examples of this kind of thing in the R-and-octave.txt file, in the contributed docs section of CRAN.

Re: [R] Can lmer() fit a multilevel model embedded in a regression?

2006-05-22 Thread Doran, Harold
So, in the hierarchical notation, does the model look like this (for the linear predictor): DV = constant + food_1(B_1) + food_2(B_2) + ... + food_82(B_82) + sex(B_83) + age(B_84) food_1 = gamma_00 + gamma_01(folic) + r_01 food_2 = gamma_10 + gamma_11(folic) + r_02 ... food_82 = gamma_20 +

Re: [R] how to vectorize a matrix

2006-05-22 Thread Martin Maechler
Christian == Christian Ritz [EMAIL PROTECTED] on Mon, 22 May 2006 11:17:32 +0200 writes: Christian Hi Lorenzo, Christian maybe the following example is of use? Christian a - matrix(1:25,5,5) Christian stack(as.data.frame(a[, c(1,3,5,2,4)])) Christian Note that

Re: [R] normality testing with nortest

2006-05-22 Thread Rolf Turner
[EMAIL PROTECTED] wrote: One thing that threw me off (and this is not really specific to Nortest as it seems to be correct, but just my understanding), but the p-value seems quite unstable. For example: It is worth noting that if the null hypothesis is true,

Re: [R] random generation of a factor

2006-05-22 Thread Rau, Roland
Hi, Does anybody know a function that generates a factor of length N with K levels given the proportions c(p1, p2,... ,pk)? It would not ## does this code piece help you? mydata - c(yesterday, today, tomorrow) myproportions - c(0.3, 0.5, 0.2) n - 20 sample(x=mydata, size=n,

Re: [R] SUSE 10.1 64 bit binary

2006-05-22 Thread Detlef Steuer
Hi, I just uploaded one to CRAN. You can use my repository http://fawn.hsu-hh.de/~steuer/SL-10.1 already. Detlef On Mon, 22 May 2006 09:46:53 +0100 Daniel Brewer [EMAIL PROTECTED] wrote: Hi, I was just wondering if anyone had created a 64 bit binary for SUSE 10.1 x86_64 yet.

Re: [R] SUSE 10.1 64 bit binary

2006-05-22 Thread Detlef Steuer
Thx, I´ll fix it! Detlef On 22 May 2006 11:43:33 +0200 Peter Dalgaard [EMAIL PROTECTED] wrote: (Incidentally, Detlef: The Source: entry in the SPEC is wrong. cvs.r-project.org is not accessible and hasn't been so for quite a while. __

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 3:26 AM, Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Sun, 21 May 2006 09:47:07 -0400 writes: Gabor If you know that test is a scalar Gabor result - if (test) a else b Gabor will do it. Yes, indeed! IMO, ifelse(test, a, b)

Re: [R] [Rd] Citation for R (was How to reference R in papers?)

2006-05-22 Thread White, Charles E WRAIR-Wash DC
The following link will take you to a long running discussion on your topic: http://tolstoy.newcastle.edu.au/R/help/06/02/21659.html Chuck Charles E. White, MS, Senior Biostatistician Walter Reed Army Institute of Research 503 Robert Grant Ave., Room 1w102 Silver Spring, MD 20910-1557 301

Re: [R] How can you buy R?

2006-05-22 Thread Deepayan Sarkar
On 5/22/06, Berwin A Turlach [EMAIL PROTECTED] wrote: [...] Thus, the last sentence of mine that you quoted: My understanding was that in that moment a product was created that would have to be wholly under the GPL, so the user was violating the GPL and lost the

Re: [R] How can you buy R?

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 3:55 AM, Berwin A Turlach wrote: G'day Deepayan, DS == Deepayan Sarkar [EMAIL PROTECTED] writes: DS let me first summarize this sub-discussion so far: [...] Sound like a perfect summary. :) DS As far as I can tell (and please correct me if I'm wrong), DS your

[R] what are supressors doing in hierarchical partitioning??

2006-05-22 Thread jones christian
Hello, After fitting a model with glm (glm(A~a+b+c+d,binomial)) I want to have a closer look at the goodness of fit for each of the 4 independant variables by using hierarchical partitioning. The results (see below) indicate that three variables (MEDIANH_HE+CLOJUL+K95) act as a supressor

Re: [R] normality testing with nortest

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 5:25 AM, Peter Dalgaard wrote: Uwe Ligges [EMAIL PROTECTED] writes: A = 0.1846, p-value = 0.9059 ad.test(rnorm(100,mean=5,sd=3)) ... A = 0.5138, p-value = 0.1887 I mistakenly had thought the p-values would be more stable since I am artificially creating a random

Re: [R] odd feature

2006-05-22 Thread Frank E Harrell Jr
Duncan Murdoch wrote: On 5/22/2006 3:26 AM, Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Sun, 21 May 2006 09:47:07 -0400 writes: Gabor If you know that test is a scalar Gabor result - if (test) a else b Gabor will do it. Yes, indeed! IMO,

Re: [R] odd feature

2006-05-22 Thread Gabor Grothendieck
If you don't like f(if (temp) a else b) then what about temp - if (test) a else b f(temp) or temp - if (test) a else b f(temp) I think its easier to understand if you factor the temp- out since one immediately then knows the purpose of the statement is to set temp. On 5/22/06, Duncan

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 9:38 AM, Frank E Harrell Jr wrote: Duncan Murdoch wrote: On 5/22/2006 3:26 AM, Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Sun, 21 May 2006 09:47:07 -0400 writes: Gabor If you know that test is a scalar Gabor result - if (test) a else b

Re: [R] odd feature

2006-05-22 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 22 May 2006 09:31:14 -0400 writes: Gabor If you don't like f(if (temp) a else b) Gabor then what about Gabor temp - if (test) a else b Gabor f(temp) Gabor or Gabor temp - if (test) Gabor a Gabor else

Re: [R] odd feature

2006-05-22 Thread Gabor Grothendieck
Due to lazy evaluation, I don't think a and b are fully evaluated: ifelse(1, a - 1, b - 2) [1] 1 a [1] 1 b Error: object b not found On 5/22/06, Martin Maechler [EMAIL PROTECTED] wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 22 May 2006 09:31:14 -0400 writes:

Re: [R] odd feature

2006-05-22 Thread Thomas Lumley
On Mon, 22 May 2006, Gabor Grothendieck wrote: Due to lazy evaluation, I don't think a and b are fully evaluated: ifelse(1, a - 1, b - 2) [1] 1 a [1] 1 b Error: object b not found yes. If you look at the code for ifelse() it evaluates the second argument if any test values are TRUE and

[R] win2k memory problem with merge()'ing repeatedly (long email)

2006-05-22 Thread Sean O'Riordain
Good afternoon, I have a 63 small .csv files which I process daily, and until two weeks ago they processed just fine and only took a matter of moments and had non noticeable memory problem. Two weeks ago they have reached 318 lines and my script broke. There are some missing-values in some of

Re: [R] odd feature

2006-05-22 Thread Thomas Lumley
On Sun, 21 May 2006, ivo welch wrote: Aside, I like the flexibility of R, but I am not thrilled by all the recycling rules. I either mean I want a scalar or a vector of equal/appropriate dimension. I never want a recycle of a smaller vector. (I do often use a recycle of a scalar.) One

Re: [R] odd feature

2006-05-22 Thread Martin Maechler
TL == Thomas Lumley [EMAIL PROTECTED] on Mon, 22 May 2006 07:09:09 -0700 (PDT) writes: TL On Mon, 22 May 2006, Gabor Grothendieck wrote: Due to lazy evaluation, I don't think a and b are fully evaluated: ifelse(1, a - 1, b - 2) [1] 1 a [1] 1 b

[R] JSS Code Snippets

2006-05-22 Thread Jan de Leeuw
JSS is trying to develop it's Code Snippets section. We have some snippets lined up and one published in the latest volume http://www.jstatsoft.org/index.php?vol=16 If you have small chunks of code of obvious relevance to statistical computing (need not be in R) consider submitting it -- why

Re: [R] Can lmer() fit a multilevel model embedded in a regression?

2006-05-22 Thread Andrew Gelman
Harold, I think we use slightly different notation (I like to use variance parameters rather than covariance matrices). Let me try to write it in model form: Data points y_i, i=1,...,800 800 x 84 matrix of predictors, X: for columns j=1,...,82, X_{i,j} is the amount of food j consumed by

[R] writing 100 files

2006-05-22 Thread Federico Calboli
Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] = sample(bb8[2,]) write.table(bb8, quote = F, sep = '\t', row.names =

Re: [R] odd feature

2006-05-22 Thread Gabor Grothendieck
On 5/22/06, Martin Maechler [EMAIL PROTECTED] wrote: TL == Thomas Lumley [EMAIL PROTECTED] on Mon, 22 May 2006 07:09:09 -0700 (PDT) writes: TL On Mon, 22 May 2006, Gabor Grothendieck wrote: Due to lazy evaluation, I don't think a and b are fully evaluated: ifelse(1, a -

Re: [R] writing 100 files

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 11:24 AM, Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] =

Re: [R] win2k memory problem with merge()'ing repeatedly (long email)

2006-05-22 Thread bogdan romocea
Repeated merge()-ing does not always increase the space requirements linearly. Keep in mind that a join between two tables where the same value appears M and N times will produce M*N rows for that particular value. My guess is that the number of rows in atot explodes because you have some

Re: [R] odd feature

2006-05-22 Thread Uwe Ligges
Gabor Grothendieck wrote: On 5/22/06, Martin Maechler [EMAIL PROTECTED] wrote: TL == Thomas Lumley [EMAIL PROTECTED] on Mon, 22 May 2006 07:09:09 -0700 (PDT) writes: TL On Mon, 22 May 2006, Gabor Grothendieck wrote: Due to lazy evaluation, I don't think a and b are fully evaluated:

Re: [R] writing 100 files

2006-05-22 Thread Uwe Ligges
Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,] = sample(bb8[2,])

Re: [R] writing 100 files

2006-05-22 Thread Marc Schwartz (via MN)
On Mon, 2006-05-22 at 16:24 +0100, Federico Calboli wrote: Hi All, I need to write as text files 1000 ish variation of the same data frame, once I permute a row. I would like to use the function write.table() to write the files, and use a loop to do it: for (i in 1:1000){ bb8[2,]

[R] RQuantlib Array processing applying EuropeanOptionExampleArray

2006-05-22 Thread Joe Byers
I am trying to replicate part of the EuropeanOptionExample using my date. I have a data.frame containing all my inputs atm.vols-subset(data.vols,moneyness==min); #Some days have the abs(moneyness) exactly between two strike prices, #Traders will alway price an option at the higher vol when

Re: [R] odd feature

2006-05-22 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 22 May 2006 11:34:09 -0400 writes: Gabor On 5/22/06, Martin Maechler [EMAIL PROTECTED] wrote: TL == Thomas Lumley [EMAIL PROTECTED] on Mon, 22 May 2006 07:09:09 -0700 (PDT) writes: TL On Mon, 22 May 2006,

Re: [R] writing 100 files

2006-05-22 Thread Sachin J
Try this: x - 1:12 for (i in 1:2){ bb8 = sample(x) a - sprintf(whatever%f.txt,i) write.table(bb8, quote = F, sep = '\t', row.names = F, col.names = F, file = a) } HTH Sachin Duncan Murdoch [EMAIL PROTECTED] wrote: On 5/22/2006 11:24 AM, Federico Calboli wrote: Hi All, I

Re: [R] intervals from cut() as numerics?

2006-05-22 Thread Gavin Simpson
On Sat, 2006-05-20 at 15:44 +0200, Dimitrios Rizopoulos wrote: as an alternative, you can have a look inside cut.default and use the part that produces the breaks, i.e., breaks - 10 groups - cut(x, breaks = breaks) max.bias - as.vector(tapply(error, groups, mean)) # from cut.default()

Re: [R] win2k memory problem with merge()'ing repeatedly (long email)

2006-05-22 Thread Sean O'Riordain
Thank you very much indeed Bogdan! a2[duplicated(a2$mdate),] value2 mdate 3180 2006-05-10 3220 2006-05-13 3240 2006-05-14 3260 2006-05-15 3280

[R] How can you buy R?

2006-05-22 Thread H. Skaug
About glmmADMB and GPL: We were not very cautious when we put in the GPL statement. What we wanted to say was that the use of glmmADMB is free, and does not require a license for AD Model Builder. Am I correct in interpreting this discussion so that all we have to do is to remove the License:

[R] choosing a mirror

2006-05-22 Thread Erin Hodgess
Dear R People: Is there a way to select a mirror from the command line instead of via a menu, please? I tried chooseCRANmirror but to no avail. Thanks in advance. R version 2.3.0 Windows. Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University

Re: [R] choosing a mirror

2006-05-22 Thread Paulo Justiniano Ribeiro Jr
I guess you are using a function like install.packages() or similar You can, for instalnce, use the argument repos e.g ...,repos=http://cran.at.r-project.br;) On Mon, 22 May 2006, Erin Hodgess wrote: Date: Mon, 22 May 2006 12:57:49 -0500 From: Erin Hodgess [EMAIL PROTECTED] To:

[R] Problem installing rgdal from source -- Makevars issue

2006-05-22 Thread Thomas Adams
List: I have installed R, contributed packages, and supporting libraries in a non-standard location (but under the same sub-directory tree). This was necessary for systems reasons beyond my control. When I attempt to use Makevars (as shown below) to install rgdal from source, I get the

[R] (no subject)

2006-05-22 Thread yohannes alazar
C/G GG CC CG G/T GG TT GT C/T CC TT CT A/G AA GG AG A/C AA CC AC A/T AA TT AT [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] editing a big file

2006-05-22 Thread yohannes alazar
I have a file that has 90 columns and 20,000 rows and looks like C/G CC GG CG G/T GG TT GT C/T CC TT CT A/G AA GG AG A/C AA CC AC A/T AA TT AT I want to write a code that will read through each row first the first looks at the first column and then replace the three columns with 12 if it is

Re: [R] choosing a mirror

2006-05-22 Thread Thomas Lumley
On Mon, 22 May 2006, Paulo Justiniano Ribeiro Jr wrote: I guess you are using a function like install.packages() or similar You can, for instalnce, use the argument repos e.g ...,repos=http://cran.at.r-project.br;) You can also set options(repos) -thomas On Mon, 22 May 2006, Erin

Re: [R] choosing a mirror

2006-05-22 Thread Romain Francois
Le 22.05.2006 19:57, Erin Hodgess a écrit : Dear R People: Is there a way to select a mirror from the command line instead of via a menu, please? I tried chooseCRANmirror but to no avail. Thanks in advance. R version 2.3.0 Windows. See repos in ?options -- visit the R Graph

Re: [R] random generation of a factor

2006-05-22 Thread Christian Bieli
Dear Dave and Roland Thanks for your answers! I think sample() does the job I'm looking for. I also came up with rmultinom(), but could not make it working, because I don't want several multinomial distributed vectors, but one vector with K levels of predefined proportions. Propably there is a

Re: [R] odd feature

2006-05-22 Thread ivo welch
Hi Thomas: One case where the vector-vector recycling rules are used is in vector-matrix operations: a-1:4 b-diag(4) a+b is this last expression intended to be intuitive and thus desirable? if anything else, I would end up writing something like this more as an error than by

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 5:01 PM, ivo welch wrote: Hi Thomas: One case where the vector-vector recycling rules are used is in vector-matrix operations: a-1:4 b-diag(4) a+b is this last expression intended to be intuitive and thus desirable? if anything else, I would end up writing

[R] Help with lagSeries (Rmetrics, fCalendar)

2006-05-22 Thread Fernando Saldanha
The function lagSeries calls the function timeSeries, which in turn calls timeDate. (All three functions are in the package fCalendar) During the call to timeDate the positions vector is altered. From that point on one has problems doing arithmetic with the series. For example, [EMAIL PROTECTED]

[R] off-topic; iraq statistics again

2006-05-22 Thread Albyn Jones
Gabor Grothendieck wrote: I came across this one: http://www.nysun.com/article/32787 which says that the violent death rate in Iraq (which presumably includes violent deaths from the war) is lower than the violent death rate in major American cities. Does anyone have any insights from

Re: [R] Problem installing rgdal from source -- Makevars issue

2006-05-22 Thread Roger Bivand
On Mon, 22 May 2006, Thomas Adams wrote: List: I have installed R, contributed packages, and supporting libraries in a non-standard location (but under the same sub-directory tree). This was necessary for systems reasons beyond my control. When I attempt to use Makevars (as shown below)

[R] Subset a list

2006-05-22 Thread Doran, Harold
I have a data frame of ~200 columns and ~20,000 rows where each column consists of binary responses (0,1) and a 9 for missing data. I am interested in finding the columns for which there are fewer than 100 individuals with responses of 0. I can use an apply function to generate a table for each

Re: [R] Subset a list

2006-05-22 Thread Marc Schwartz (via MN)
On Mon, 2006-05-22 at 17:55 -0400, Doran, Harold wrote: I have a data frame of ~200 columns and ~20,000 rows where each column consists of binary responses (0,1) and a 9 for missing data. I am interested in finding the columns for which there are fewer than 100 individuals with responses of 0.

[R] Ordinal Independent Variables

2006-05-22 Thread Rick Bilonick
When I run lrm from the Design package, I get a warning about contrasts when I include an ordinal variable: Warning message: Variable ordfac is an ordered factor. You should set options(contrasts=c(contr.treatment,contr.treatment)) or Design will not work properly. in: Design(eval(m,

[R] sort the values of members and obtain their ranks within groups

2006-05-22 Thread Zhen Zhang
Dear all, I would like to sort the values of member for each group, and obtain a variable to indicate its rank within the group. For example, we have original dataset as follows: df - data.frame(group = c(rep(1, 3), rep(5, 3)), member = c(30, 10, 22, 21, 44, 15)) group member 1 1 30

Re: [R] Subset a list

2006-05-22 Thread Chuck Cleland
Doran, Harold wrote: I have a data frame of ~200 columns and ~20,000 rows where each column consists of binary responses (0,1) and a 9 for missing data. I am interested in finding the columns for which there are fewer than 100 individuals with responses of 0. I can use an apply function to

Re: [R] Ordinal Independent Variables

2006-05-22 Thread Frank E Harrell Jr
Rick Bilonick wrote: When I run lrm from the Design package, I get a warning about contrasts when I include an ordinal variable: Warning message: Variable ordfac is an ordered factor. You should set options(contrasts=c(contr.treatment,contr.treatment)) or Design will not work properly.

Re: [R] sort the values of members and obtain their ranks within groups

2006-05-22 Thread jim holtman
x group member 1 1 30 2 1 10 3 1 22 4 5 21 5 5 44 6 5 15 x$order - NA invisible(tapply(seq(nrow(x)), x$group, function(y) x$order[y] - rank(x$member[y]))) x group member order 1 1 30 3 2 1 10 1 3 1 22 2 4

[R] How to call a value labels attribute?

2006-05-22 Thread Heinz Tuechler
Dear All, after searching on CRAN I got the impression that there is no standard way in R to label values of a numerical variable. Since this would be useful for me I intend to create such an attribute, at the moment for my personal use. Still I would like to choose a name which does not conflict

[R] standardization of values before call to pam() or clara()

2006-05-22 Thread Dylan Beaudette
Greetings, Experimenting with the cluster package, and am starting to scratch my head in regards to the *best* way to standardize my data. Both functions can pre-standardize columns in a dataframe. according to the manual: Measurements are standardized for each variable (column), by

Re: [R] Cross correlation/ bivariate/ mantel

2006-05-22 Thread Spencer Graves
RSiteSearch(mantel statistic) produced 27 hits for me, but the first few suggested I might not find enlightenment there. RSiteSearch(spatial statistics) returned 1064 hits, so I restricted that to RSiteSearch(spatial statistics, functions). The first of those was a director for the

Re: [R] Cross correlation/ bivariate/ mantel

2006-05-22 Thread McClatchie, Sam \(PIRSA-SARDI\)
Thanks Spencer Give a wo/man a fish and s/he becomes an aid dependent, give a wo/man a rod and s/he becomes a fisherman Sam -Original Message- From: Spencer Graves [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 May 2006 9:58 AM To: McClatchie, Sam (PIRSA-SARDI) Cc:

Re: [R] RQuantlib

2006-05-22 Thread Joe Byers
RQuantlib Experrs I am trying to perform some analysis on a dataset of options. I got RQuantlib to work using a for loop over my data.frame. I tried the sapply, lapply, and other apply functions to no avial. My first error occurs with the following x-sapply(X=atm.work,FUN=EuropeanOption,

[R] lattice package - question on plotting lines

2006-05-22 Thread Tim Smith
Hi all, I was trying to plot a graph using the following data: method percent accuracy group A1 4 0.8529 cns A1 10 0.8412 cns A1 15 0.8235 cns A2 4 0.9353 cns A2 10 0.9412 cns A2 15 0.9471 cns A1 4 0.8323 col A1 10 0.8452 col A1 15 0.8484 col A2 4 0.8839 col A2 10 0.8677 col A2 15

[R] nls: formula error?

2006-05-22 Thread H. Paul Benton
So thanks for the help, I have a matrix (AB) which in the first column has my bin numbers so -4 - +4 in 0.1 bin units. Then I have in the second column the frequency from some data. I have plotted them and they look roughly Gaussian. So I want to fit them/ find/optimize mu, sigma, and A. So I

Re: [R] editing a big file

2006-05-22 Thread jim holtman
Here is one way of doing it: x - c(C/G, CC, GG, CG, G/T, GG, TT, GT, C/T, CC, + TT, CT, A/G, AA, GG, AG, A/C, AA, CC, AC, + A/T, AA, TT, AT) # convert to a matrix with 4 columns x - matrix(x, ncol=4, byrow=TRUE) x [,1] [,2] [,3] [,4] [1,] C/G CC GG CG [2,] G/T GG TT GT [3,] C/T CC TT CT

Re: [R] sort the values of members and obtain their ranks within groups

2006-05-22 Thread Liaw, Andy
See if this does what you want: cbind(df, rank=ave(df$member, df$group, FUN=rank)) group member rank 1 1 303 2 1 101 3 1 222 4 5 212 5 5 443 6 5 151 Andy _ From: [EMAIL PROTECTED] on behalf of Zhen Zhang Sent:

Re: [R] lattice package - question on plotting lines

2006-05-22 Thread Tony
On Mon, 2006-05-22 at 18:36 -0700, Tim Smith wrote: Hi all, I was trying to plot a graph using the following data: method percent accuracy group A1 4 0.8529 cns A1 10 0.8412 cns A1 15 0.8235 cns A2 4 0.9353 cns A2 10 0.9412 cns A2 15 0.9471 cns A1 4 0.8323 col A1 10 0.8452

Re: [R] RQuantlib Array processing applying EuropeanOptionExampleArray

2006-05-22 Thread Dirk Eddelbuettel
On 22 May 2006 at 10:57, Joe Byers wrote: | I try and run the EuropeanOption example using atm.work$For_Price as my | array of underlying prices and the other inputs from row 9 of atm.work. | i-9; | x-EuropeanOption(type = put, underlying = atm.work$For_Price, strike | = atm.work$K[i], |

[R] RMySQL on Mac OS 10.4

2006-05-22 Thread Ryan Hafen
I have been having trouble getting RMySQL to work on Mac OS 10.4. It was working fine for me about a year ago but I didn't touch it for a while and several upgrades of R, MySQL, and OS X later, it is not working. I first had the problem that others have been having getting the error

Re: [R] RQuantlib Array processing applying EuropeanOptionExampleArray

2006-05-22 Thread Joe Byers
Dirk, Thank you. Shortly after I sent this email off, I discovered that I left the Array off the function name. It worked fine. My ignorance and oversight. Thanx for the help. Joe Dirk Eddelbuettel wrote: On 22 May 2006 at 10:57, Joe Byers wrote: | I try and run the EuropeanOption

Re: [R] RMySQL on Mac OS 10.4

2006-05-22 Thread Seth Falcon
Ryan Hafen [EMAIL PROTECTED] writes: dbWriteTable(con, test, rnorm(100)) Error in .class1(object) : no direct or inherited method for function 'dbWriteTable' for this call For more info, I am running OS X 10.4.6, R 2.2.1, I have compiled RMySQL from source version 0.5-7, and I'm

Re: [R] nls: formula error?

2006-05-22 Thread Gabor Grothendieck
The data= argument cannot be a matrix. See ?nls On 5/22/06, H. Paul Benton [EMAIL PROTECTED] wrote: So thanks for the help, I have a matrix (AB) which in the first column has my bin numbers so -4 - +4 in 0.1 bin units. Then I have in the second column the frequency from some data. I have

[R] Get list of ODBC data sources?

2006-05-22 Thread Jim Porzak
Hello R Helpers, Before setting up a connection with RODBC, I would like to present my users with a pick list of ODBC data sources available in their environment. I may be missing something, but don't see anything in RODBC itself to return list of sources for use in select.list(). Any hints? I'm

[R] Plotting problem-Dendrograms Help!!

2006-05-22 Thread j.joshua thomas
Dear List, My dataset is as below: I am using library(cluster) hierarchical clustering on these data. If i try to plot these i couldn't see the partitions clearly, please find the link on the plot : http://roughjade.blogspot.com Could anyone give me some suggesstions. AAP326 29 AAW315 37

[R] hclust-Dendrograms-Help!

2006-05-22 Thread j.joshua thomas
Dear List, My dataset is as below: I am using library(cluster) hierarchical clustering on these data. If i try to plot these i couldn't see the partitions clearly, dd-hclust(dist(DataSetS01022Full), ave) Warning message: NAs introduced by coercion (dn-as.dendrogram(dd)) plot(dn) please

[R] Possible with lm() or glm()?

2006-05-22 Thread John Vokey
HelpeRs, I have what amounts to a stupid design---entirely my fault, but it seemed like a good idea at the time. Every participant in the experiment receives a series of a two-alternative forced-choice (2afc) pairs generated at random from a pool of items that make up the pairs. The