Re: [R] error in NORM lib

2005-11-09 Thread Ted Harding
On 09-Nov-05 Prof Brian Ripley wrote: You really need to send such issues to the _package_ maintainer: please see the posting guide. He will need a completely reproducible example. On Wed, 9 Nov 2005, Leo Gürtler wrote: Dear alltogether, I experience very strange behavior of imputation

[R] useR! 2006: submission registration started!

2005-11-09 Thread Torsten Hothorn
We are happy to inform you that the online abstract submission and registration for `useR! 2006' is now available online from http://www.R-project.org/useR-2006/ This second world meeting of the R user community will take place at the Wirtschaftsuniversitaet Wien, Vienna, Austria, June 15 to

Re: [R] R seems to stall after several hours on a long series of analyses... where to start?

2005-11-09 Thread Sixten Borg
Hi, I saw something similar, when I had R to look in a file every half minute if there was a request to do something, and if so, do that something and empty the file. (This was my way of testing if I coud do an interactive web page, somehow I managed to get the web page to write the requests

[R] Title and axis

2005-11-09 Thread Mark Miller
I was wandering how to set the labels for the axis and how to set the title so that the default title name is not displayed under the title I set. I also use the following to save the plot to a file but it does not seem to save (I use postscript for use in my Latex document) x = seq(0,30,0.01)

[R] Title and axis

2005-11-09 Thread Mark Miller
I was wandering how to set the labels for the axis and how to set the title so that the default title name is not displayed under the title I set. I also use the following to save the plot to a file but it does not seem to save (I use postscript for use in my Latex document) x = seq(0,30,0.01)

[R] Problem with Running Locfit

2005-11-09 Thread anil kumar rohilla
Dear R users, i am using locfit package developed by loader in R software, my problem is that as i am doing independont forecast using locfit object , i am able to do independont forecast for more than one years simultaniously. But when i am doing one year forecast(single) this code is

Re: [R] writing R shell scripts?

2005-11-09 Thread Henrik Bengtsson
Mike Miller wrote: On Wed, 9 Nov 2005, Henrik Bengtsson wrote: A note of concern: When writing batch scripts like this, be explicit and use the print() statement. A counter example to compare echo 1; 2 | R --slave --no-save and echo print(1); print(2) | R --slave --no-save I

[R] Variogram

2005-11-09 Thread Edzer J. Pebesma
Leaf, please note that r-help is not the appropriate place to ask package-specific questions. We have r-sig-geo for questions related to geographic data in R, and gstat has a mailing list on its own. The answer is below. -- Edzer Leaf wrote: Dear All, Is there anybody has the experience in

[R] using abline and a fitted 2nd degree formula

2005-11-09 Thread CG Pettersson
Hello all, R2.1.1, Wk2 I am doing some two-step plotting, first using plot() to illustrate the datapoints and then using abline() to place a trend line from a fitted model into the plot. Everything works well as long as the formula of the fitted model i of the type: m1 - lm(Dependent ~

Re: [R] polynomials transformation

2005-11-09 Thread Chuck Cleland
The coefficients are in the attribute list: x - rnorm(100) attributes(poly(x, 2))$coefs $alpha [1] -0.1585783 -0.1193990 $norm2 [1] 1. 100. 110.3589 254.5965 ?attributes Abd. Rahman Kassim wrote: Dear All, Need some help in polynomials transformation to get the coefficients.

[R] annot have zero distances in corSpatial

2005-11-09 Thread arun lal
Hi all, I have been attempting this repeated measure analysis where correlation among observations (within each subject) is spatial. My command is: fdat.lme1-lme(Lint~Rep+Treatment,data=fdat,random=~1|fldPos,correlation=corLin(form=~lat+lon)) It is generating follwoing error: Error in

Re: [R] using abline and a fitted 2nd degree formula

2005-11-09 Thread Prof Brian Ripley
On Wed, 9 Nov 2005, CG Pettersson wrote: Hello all, R2.1.1, Wk2 ^^^ week 2? I am doing some two-step plotting, first using plot() to illustrate the datapoints and then using abline() to place a trend line from a fitted model into the plot. Everything works well as long as the

[R] Query

2005-11-09 Thread Armelini, Guillermo
Dear all, My name is Guillermo I'm trying to write a short program to find all the possible combination in fitting an ARIMA Model. My script is the following: n=rnorm(100)+5 Aux.M=matrix(NA,nrow=100,ncol=2) L=1 for(i in 0:2) {for(j in 0:2) {for(k in 0:2)

[R] moc function, normal distribution peak capture

2005-11-09 Thread huan . huang
Hi With moc function (in moc library), I try to apply a mixture of 2 normal distribution for univariate data which has 2 peaks, however I found it came down to 1 normal distribution (weights became 1 and 0) and could not capture the 2nd peaks in many cases. I set the first mode and second mode as

Re: [R] Can I run both R and Python through Emacs

2005-11-09 Thread Rau, Roland
Dear Sri, probably this is the wrong list to address this question. For example, there are the newsgroups comp.emacs.xemacs or comp.lang.python which are probably more appropriate. Nevertheless, I don't think you need to do anything to configure XEmacs for Python. Just open or create a file with

Re: [R] Query

2005-11-09 Thread Prof Brian Ripley
On Wed, 9 Nov 2005, Armelini, Guillermo wrote: Dear all, My name is Guillermo I'm trying to write a short program to find all the possible combination in fitting an ARIMA Model. My script is the following: n=rnorm(100)+5 Aux.M=matrix(NA,nrow=100,ncol=2) L=1 for(i in 0:2) {for(j in 0:2)

[R] Command line and R

2005-11-09 Thread Angelo Secchi
Hi, I wrote a small R script (delta.R) using commandArgs(). The script works from the shell in usual way R --no-save arg1 delta2.R Suppose arg1 is the output of another shell command (e.g. gawk, sed ...). Is there a way to tell R to read arg1 from the output of the previous command? Any other

Re: [R] Type II and III sums of squares with Error in AOV

2005-11-09 Thread Prof Brian Ripley
A multistratum aov() fit is just a list of aov() fits, so you can apply functions such as Anova to the individual strata. However, why do you want types II and III sums of squares? It is usual to do this type of analysis only with balanced designs. In the cases I can envisage that these make

Re: [R] Variograms and large distances

2005-11-09 Thread Ruben Roa
-Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of Julian Burgos Sent: Tuesday, November 08, 2005 10:41 PM To: r-help@stat.math.ethz.ch Subject: [R] Variograms and large distances Hello R list, I need to compute empirical variograms using data

Re: [R] R, Apache and PHP (was no subject)

2005-11-09 Thread Elio Mineo
There are several projects on this. Look at http://franklin.imgen.bcm.tmc.edu/R.web.servers/ Bye Grupo Logit wrote: hello. My name is kerlim arturo. i was search into internet about R apache y PhP and i found your mail into foro. i want create a stadistic's software on line with language

Re: [R] Command line and R

2005-11-09 Thread Roger Bivand
On Wed, 9 Nov 2005, Angelo Secchi wrote: Hi, I wrote a small R script (delta.R) using commandArgs(). The script works from the shell in usual way R --no-save arg1 delta2.R Suppose arg1 is the output of another shell command (e.g. gawk, sed ...). Is there a way to tell R to read

[R] About: Error in FUN(X[[1]], ...) : symbol print-name too long

2005-11-09 Thread gsmatos1
Hi, I´m trying to use the Win2BUGS package from R and I have a similar problem that reurns with the message: Error in FUN(X[[1]], ...) : symbol print-name too long But, there is no stray ` character in the file ( Sugestions given by: Duncan Temple Lang duncan Date: Mon, 26 Sep 2005

Re: [R] Command line and R

2005-11-09 Thread Ted Harding
On 09-Nov-05 Roger Bivand wrote: On Wed, 9 Nov 2005, Angelo Secchi wrote: Hi, I wrote a small R script (delta.R) using commandArgs(). The script works from the shell in usual way R --no-save arg1 delta2.R Suppose arg1 is the output of another shell command (e.g. gawk, sed ...). Is

Re: [R] Type II and III sums of squares with Error in AOV

2005-11-09 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: A multistratum aov() fit is just a list of aov() fits, so you can apply functions such as Anova to the individual strata. However, why do you want types II and III sums of squares? It is usual to do this type of analysis only with balanced

Re: [R] how to plot the circles in matrix form

2005-11-09 Thread Roger D. Peng
Would 'symbols()' be of use? -roger shanmuha boopathy wrote: Could you help me to plot the circles in the form of matrix like O O O O O O O O O O O O thank you.. with regards, boopathy. Thirumalai Shanmuha Boopathy, Zimmer no : 07-15, Rütscher strasse 165,

Re: [R] Command line and R

2005-11-09 Thread Angelo Secchi
On Wed, 09 Nov 2005 12:25:37 - (GMT) (Ted Harding) [EMAIL PROTECTED] wrote: On 09-Nov-05 Roger Bivand wrote: On Wed, 9 Nov 2005, Angelo Secchi wrote: Hi, I wrote a small R script (delta.R) using commandArgs(). The script works from the shell in usual way R --no-save arg1

Re: [R] Title and axis

2005-11-09 Thread Marc Schwartz
On Wed, 2005-11-09 at 10:47 +0200, Mark Miller wrote: I was wandering how to set the labels for the axis and how to set the title so that the default title name is not displayed under the title I set. I also use the following to save the plot to a file but it does not seem to save (I use

[R] dataframe without repetition

2005-11-09 Thread Bruno Cutayar
Hello, with a data.frame like this : toto - data.frame(id=c(id1,id1,id2,id3,id3,id3),dpt=c(13,13,34,30,30,30)) toto id dpt 1 id1 13 2 id1 13 3 id2 34 4 id3 30 5 id3 30 6 id3 30 what is the most efficient ways to obtain : id dpt 1 id1 13 2 id2 34 3 id3 30 ? thanks in advance

Re: [R] dataframe without repetition

2005-11-09 Thread Chuck Cleland
?unique unique(toto) id dpt 1 id1 13 3 id2 34 4 id3 30 Bruno Cutayar wrote: Hello, with a data.frame like this : toto - data.frame(id=c(id1,id1,id2,id3,id3,id3),dpt=c(13,13,34,30,30,30)) toto id dpt 1 id1 13 2 id1 13 3 id2 34 4 id3 30 5 id3 30 6 id3 30

[R] Tendancy Chi test?

2005-11-09 Thread Julie Lejeune
Hello, I would like to know what I do it to test correlation between ordered categorical variables. Tendancy Chi test? Thank you, Melle Lejeune Julie [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] dataframe without repetition

2005-11-09 Thread jim holtman
toto[!duplicated(apply(toto,1,paste, collapse='.')),] id dpt 1 id1 13 3 id2 34 4 id3 30 On 11/9/05, Bruno Cutayar [EMAIL PROTECTED] wrote: Hello, with a data.frame like this : toto - data.frame (id=c(id1,id1,id2,id3,id3,id3),dpt=c(13,13,34,30,30,30)) toto id dpt 1 id1 13 2 id1 13

Re: [R] dataframe without repetition

2005-11-09 Thread Prof Brian Ripley
unique(): see its help page. (It has a data-frame method.) On Wed, 9 Nov 2005, Bruno Cutayar wrote: Hello, with a data.frame like this : toto - data.frame(id=c(id1,id1,id2,id3,id3,id3),dpt=c(13,13,34,30,30,30)) toto id dpt 1 id1 13 2 id1 13 3 id2 34 4 id3 30 5 id3 30 6

[R] R: Re: RODBC fails to build

2005-11-09 Thread Vittorio
Dear All, Thanks to the suggestion of Prof Ripley I progressively solved the many libraries problems connected to the installation of the R package RODBC under FreeBSD 5.4. *** As far as this OS is concerned *** please take notice that the sentence in the README file:. Use the configure

Re: [R] Type II and III sums of squares with Error in AOV

2005-11-09 Thread Jarrett Byrnes
While my original design was balanced, I lost several replicates due to a storm, making the whole thing unbalanced. Ah, the realities of ecology. So, how does one look at individual strata, and then how would one report an aggregate test of the effect in general? On Nov 9, 2005, at 4:38 AM,

[R] source of susbcript out of bounds error in nmle

2005-11-09 Thread Bill Shipley
A few days ago I posted a question to this discussion group concerning to origin of an error message subscript out of bounds while using the nonlinear mixed model (nlme) function in R with a self-starting function. Thanks for those who responded. This posting is to explain what (I think) it

[R] two Kaplan-Meier Curves in one plot

2005-11-09 Thread Verena Hoffmann
Hello! Maybe someone is able to help me here: I want to compare the survival probabilities of patients treated with two different kinds of medicine. So I did the KM - survfit(Surv(Time, Status), type=Kaplan-Meier) plot(KM) for each group seperatly. But now I want to compare

[R] Is there no LU-Decomposition in R?

2005-11-09 Thread Christian Hinz
I need the LU_Decomposition for my conversion of the DIRK/SDIRK (singly diagonally Runge Kutta implicit methods) algorithm. thank you in advance. Christian Hinz -- -- __ R-help@stat.math.ethz.ch mailing list

[R] read.table error with R 2.2.0

2005-11-09 Thread Florence Combes
Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : - param-read.table(file=param.dat,sep =\t,header=TRUE,fill=TRUE, na.strings=NA) Erreur dans

[R] trellis: positioning of key

2005-11-09 Thread Christoph Scherber
Dear R users, Using xyplot(), how can I position the key in the *margin* outside the plotting area ? My problem is that the key always overlaps with the x axis labels, no matter how I try to specify any of the par() arguments (e.g. oma()). Many thanks for any suggestions! Christoph ### for

[R] Problems with Shapiro Wilk's test of normality.

2005-11-09 Thread Fredrik Karlsson
Hi, I am trying to create a table with information from Shapiro Wilk's test of normality. However, it fails due to lack of sample size, it says, but the way I see it, this is not a problem. (See the table of sample sizes (almost) at the bottom). Applying a different function using a similar

Re: [R] Is there no LU-Decomposition in R?

2005-11-09 Thread Mike Miller
On Wed, 9 Nov 2005, Christian Hinz wrote: I need the LU_Decomposition for my conversion of the DIRK/SDIRK (singly diagonally Runge Kutta implicit methods) algorithm. I think you need the Matrix package: http://cran.r-project.org/src/contrib/Descriptions/Matrix.html Mike

Re: [R] read.table error with R 2.2.0

2005-11-09 Thread Duncan Murdoch
On 11/9/2005 10:07 AM, Florence Combes wrote: Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : - param-read.table(file=param.dat,sep

Re: [R] Interpretation of output from glm

2005-11-09 Thread Pedro de Barros
Dear John, Thanks for the quick reply. I did indeed have these ideas, but somehow floating, and all I could find about this mentioned categorical predictors. Can you suggest a good book where I could try to learn more about this? Thanks again, Pedro At 01:49 09/11/2005, you wrote: Dear

Re: [R] writing R shell scripts?

2005-11-09 Thread Na Li
On 7 Nov 2005, Mike Miller wrote: Is it possible to do this sort of thing in R using something like this?: #!/usr/lib/R/bin/R.bin Well, that isn't quite it because I tried it and it didn't work! Mike, I use a shell script to do this which also allows passing in command line options.

Re: [R] read.table error with R 2.2.0

2005-11-09 Thread Florence Combes
Thanks a lot for your answer. In fact I found the solution, it's seems strange to me so I put it here if it could bu useful for other people ... I have the same as you getAnywhere(read.table)$where [1] package:base namespace:base getAnywhere(read.table.default)$where character(0) when I run it

Re: [R] Tendancy Chi test?

2005-11-09 Thread Torsten Hothorn
On Wed, 9 Nov 2005, Julie Lejeune wrote: Hello, I would like to know what I do it to test correlation between ordered categorical variables. Tendancy Chi test? a linear-by-linear association test is one possibilty, see `lbl_test' in package `coin'. Best, Torsten Thank you, Melle

Re: [R] read.table error with R 2.2.0

2005-11-09 Thread Peter Dalgaard
Florence Combes [EMAIL PROTECTED] writes: Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : - param-read.table(file=param.dat,sep

Re: [R] trellis: positioning of key

2005-11-09 Thread Deepayan Sarkar
On 11/9/05, Christoph Scherber [EMAIL PROTECTED] wrote: Dear R users, Using xyplot(), how can I position the key in the *margin* outside the plotting area ? My problem is that the key always overlaps with the x axis labels, no matter how I try to specify any of the par() arguments

Re: [R] writing R shell scripts?

2005-11-09 Thread Mike Miller
On Wed, 9 Nov 2005, Henrik Bengtsson wrote: Put everything in curly brackets as my above example show. Ah ha! This leads to the latest version of my little one-liner (called doR): #!/bin/sh echo output - { $1 }; write.table(file=stdout(), .Last.value, row.names=FALSE, col.names=FALSE); q() |

[R] elements in a matrix to a vector

2005-11-09 Thread Mike Jones
hi all, i'm trying to get elements in a matrix into a vector. i need a streamlined way to do it as the way i'm doing it is not very serviceable. an example is a 3x3 matrix like 0 0 3 2 0 0 0 4 0 to a vector like 3 2 4 thanks...mj [[alternative HTML version deleted]]

[R] Replace missing values in spatial design using moving average

2005-11-09 Thread Arnaud Dowkiw
Dera R helpers, I have a (x,y,z) data file where x and y are spatial coordinates and z a variable. I have some missing values in the z column and I would like to replace them with an optimized estimation from the neighbour cells. I could not find any function in R to do that. Is anybody aware

[R] short suggestion to the R development team

2005-11-09 Thread ivo welch
Dear R developpment team: would it be easy to introduce a global variable (in options()) that contains the name of the R file that is currently being processed? (ala \jobname in latex.) if this is difficult, would it be easy to introduce something like $0 in perl (i.e., argv[0] in C), which

Re: [R] Type II and III sums of squares with Error in AOV

2005-11-09 Thread Γιάννης Δημάκος
On Wed, November 9, 2005 14:38, Peter Dalgaard wrote: Prof Brian Ripley [EMAIL PROTECTED] writes: A multistratum aov() fit is just a list of aov() fits, so you can apply functions such as Anova to the individual strata. However, why do you want types II and III sums of squares? It is usual

Re: [R] retrieve most abundant species by sample unit

2005-11-09 Thread Dave Roberts
Graham, It's relatively easily done, especially the first one. Let's suppose your veg data frame is called veg dom1 - apply(veg,1,which.max) returns a vector with the column number of the species with the highest abundance for each sample (if there are ties, it returns the first one). If

Re: [R] elements in a matrix to a vector

2005-11-09 Thread Peter Dalgaard
Mike Jones [EMAIL PROTECTED] writes: hi all, i'm trying to get elements in a matrix into a vector. i need a streamlined way to do it as the way i'm doing it is not very serviceable. an example is a 3x3 matrix like 0 0 3 2 0 0 0 4 0 to a vector like 3 2 4 You need to explain

Re: [R] elements in a matrix to a vector

2005-11-09 Thread roger koenker
If you are really looking for a way to extract the non-zero elements you can use something like the following: library(SparseM) A [,1] [,2] [,3] [1,]003 [2,]200 [3,]040 as.matrix.csr(A)@ra [1] 3 2 4 there is a tolerance parameter in the coercion

Re: [R] elements in a matrix to a vector

2005-11-09 Thread Berton Gunter
A matrix is a vector with a dim() attribute. Values are stored in column major order (first column on top of second column on top of ...). Thus, if mymatrix is your matrix, mymatrix[as.logical(mymatrix)] gives c(2,4,3), because as.logical(0) = FALSE, as.logical(nonzero) = TRUE. If you are

[R] strategies to obtain convergence using nlme

2005-11-09 Thread Bill Shipley
Hello. I am working on an analysis involving the nonlinear mixed model function (nlme) in R. The data consist of measures of carbon fixation by leaves as a function of light intensity and the parametric function (standard in this area because it has a biological interpretation) is a

Re: [R] elements in a matrix to a vector

2005-11-09 Thread Dave Roberts
Mike, It's not clear whaty way you are doing it now, but this works x - matrix(c(0,2,0,0,0,4,3,0,0),nrow=3) x [,1] [,2] [,3] [1,]003 [2,]200 [3,]040 y - as.vector(t(x)) z - y[y!=0] z [1] 3 2 4 Dave Mike Jones wrote: hi all, i'm

[R] Course***R/Splus Fundamentals and Programming Techniques, December 2005

2005-11-09 Thread elvis
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce 2-day R/S-plus Fundamentals and Programming Techniques in New York and Boston: www.xlsolutions-corp.com/Rfund.htm Boston December 15th-16th, 2005 New York

Re: [R] short suggestion to the R development team

2005-11-09 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I assume you are talking about source() when you say R file that is currently being processed. A few weeks ago I worked on an enhanced version of source. It allows * nested source() with relative links, * looking for files in a pre-defined set of

Re: [R] Variogram

2005-11-09 Thread Leaf Sun
Sorry about this, I didn't know. I guess I have posted too much garbage on here. Thanks to Edzer for your answers! Leaf === At 2005-11-09, 02:14:21 you wrote: === Leaf, please note that r-help is not the appropriate place to ask package-specific questions. We have r-sig-geo for

Re: [R] elements in a matrix to a vector

2005-11-09 Thread Mike Jones
my apologies to everyone taking the time to answer this question. i didn't explain myself very well. i have the indices of the elements of the matrix and the matrix won't necessarily have zeros everywhere else. is there a way to use the indices to strip the elements i need? thanks again...mj

[R] Small Area Estimation with R

2005-11-09 Thread Gómez Rubio, Virgilio
Dear R users, First of all, excuse for the cross posting. I am working on Small Area Estimation and I was wondering if someone knows about software to compute GREG, syntehtic and/or (E)BLUP estimators with R. I know that it should be posible to compute those estimators using package nlme (for

Re: [R] frequency() source code

2005-11-09 Thread bob mccall
Thanks for the replies. I finally figured it out after looking at ts.R and the docs for ts(). I should have looked into ts() first, instead of frequency(). Didn't realize exactly what I was doing in declaring a data set as ts(). Thanks again, Bob Prof Brian Ripley [EMAIL PROTECTED]

[R] Element-by-element multiplication operator?

2005-11-09 Thread Gates, Michael BGI SF
Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Thanks -Mike Gates __

Re: [R] elements in a matrix to a vector

2005-11-09 Thread Ray Brownrigg
my apologies to everyone taking the time to answer this question. i didn't explain myself very well. i have the indices of the elements of the matrix and the matrix won't necessarily have zeros everywhere else. is there a way to use the indices to strip the elements i need? RTFM ?[.

Re: [R] short suggestion to the R development team

2005-11-09 Thread Gabor Grothendieck
In R 2.2.0 (it might be different in other versions) just put this in your source file: this.file - parent.frame(2)$ofile (If you place it into a function in your sourced file then will need to increase the number 2 to take into account of the extra call.) On 11/9/05, ivo welch [EMAIL

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread Gabor Grothendieck
See: http://cran.r-project.org/doc/contrib/R-and-octave-2.txt On 11/9/05, Gates, Michael BGI SF [EMAIL PROTECTED] wrote: Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread David Forrest
On Wed, 9 Nov 2005, Gates, Michael BGI SF wrote: Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... It is the default:

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread Duncan Murdoch
On 11/9/2005 2:26 PM, Gates, Michael BGI SF wrote: Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Just use *. If you want

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread hadley wickham
Is there an element-by-element multiplication in R, like the .* operator in Matlab? How about *? a - matrix(1:4, 2, 2) b - matrix(4:7, 2, 2,) a * b Hadley __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread Tobias Verbeke
Gates, Michael BGI SF wrote: Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... mym - matrix(1:4,2) myt - matrix(5:8,2) mym

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread Peter Dalgaard
Gates, Michael BGI SF [EMAIL PROTECTED] writes: Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... It's * , plain and simple.

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread davidr
A*B David L. Reiner -Original Message- From: [EMAIL PROTECTED] [mailto:r-help- [EMAIL PROTECTED] On Behalf Of Gates, Michael BGI SF Sent: Wednesday, November 09, 2005 1:26 PM To: r-help@stat.math.ethz.ch Subject: [R] Element-by-element multiplication operator? Is there an

[R] Order of terms in a model specification...

2005-11-09 Thread Oliver Lyttelton
Hi, Sorry for this one as its pretty basic but I've taken a look for info and couldn't find any... My question is, does the order of main effect terms in a model specification have any impact on the model R fits or not. (in particular when using lm). ie Can A~X+Y+Z lead to different results

[R] how to convert strings back to values?

2005-11-09 Thread Illyes Eszter
Dear All, It's Eszter from Hungary, a total beginner with R. My problem is the following: I have a dataset with binary values as a comma separated textfile. The samples are in the coloumns and the species are in the rows. I have to transpose it for the further PCoA analysis. There is no

[R] How to find statistics like that.

2005-11-09 Thread Gao Fay
Hi there, Suppose mu is constant, and error is normally distributed with mean 0 and fixed variance s. I need to find a statistics that: Y_i = mu + beta1* I1_i beta2*I2_i + beta3*I1_i*I2_i + +error, where I_i is 1 Y_i is from group A, and 0 if Y_i is from group B. It is large when

[R] R-and-octave (was Element-by-element multiplication operator?)

2005-11-09 Thread Mike Miller
On Wed, 9 Nov 2005, Gabor Grothendieck wrote: See: http://cran.r-project.org/doc/contrib/R-and-octave-2.txt That is a really beautiful page. If the author is willing to update it to include some of the new Octave functionality -- specifically N-dimensional arrays -- I'm sure I can help

[R] library(lattice)

2005-11-09 Thread jia ding
I first try these command, it works quite well. library(lattice) data(cuckoos) levnam - strsplit(levels(cuckoos$species), \\.) BUT, i want to try : levnam - strsplit(levels(cuckoos$species), .) to see the difference. They maybe I modified the data file, because when I try again, it says:

[R] accident modified dataset. How can I recovery it?!

2005-11-09 Thread jia ding
I first try these command, it works quite well. library(lattice) data(cuckoos) levnam - strsplit(levels(cuckoos$species), \\.) BUT, i want to try : levnam - strsplit(levels(cuckoos$species), .) to see the difference. They maybe I modified the data file, because when I try again, it says:

[R] Compiling R on Sparc-Solaris-2.9

2005-11-09 Thread Toby Muhlhofer
Hi, all! I'm trying to compile R on a Solaris machine. The default C compiler is cc (although gcc is available) and the default Fortran compiler is f95 (although g77 is available). Without defining the F77 environment variable, configure defaults to f95 as a Fortran compiler and eventually

Re: [R] accident modified dataset. How can I recovery it?!

2005-11-09 Thread jia ding
I tried to reinstall the package. but my R version is too old. [EMAIL PROTECTED]:~$ sudo R CMD INSTALL -l /usr/lib/R/library /home/dj/Desktop/lattice_0.12-11.tar.gz Password: ERROR: This R is version 2.1.1 package 'lattice' needs R = 2.2.0 So, *my question being, how do I upgrade from R version

Re: [R] Order of terms in a model specification...

2005-11-09 Thread Duncan Murdoch
On 11/9/2005 3:48 PM, Oliver Lyttelton wrote: Hi, Sorry for this one as its pretty basic but I've taken a look for info and couldn't find any... My question is, does the order of main effect terms in a model specification have any impact on the model R fits or not. (in particular when

Re: [R] How to find statistics like that.

2005-11-09 Thread Mike Miller
On Wed, 9 Nov 2005, Gao Fay wrote: Hi there, Suppose mu is constant, and error is normally distributed with mean 0 and fixed variance s. I need to find a statistics that: Y_i = mu + beta1* I1_i beta2*I2_i + beta3*I1_i*I2_i + +error, where I_i is 1 Y_i is from group A, and 0 if Y_i is from

[R] help with legacy R code

2005-11-09 Thread David Zhao
Hi there, Could somebody help me disect this legacy R script I inherited at work, I have two questions: 1. I've tried to upgrade our R version from 1.6.2 (yeah, I know), to R 2.0, but some of the lines in this script are not compatible with R 2.0, could someone help me figure out where the

Re: [R] how to convert strings back to values?

2005-11-09 Thread Francisco J. Zagmutt
Examples of the code you used would have helped i.e. We don't know how you transposed your matrix. Did you use t()? In any event, as.integer() may be what you need. Francisco From: Illyes Eszter [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] how to convert strings back to

Re: [R] read.table error with R 2.2.0

2005-11-09 Thread Henrik Bengtsson
Florence Combes wrote: Thanks a lot for your answer. In fact I found the solution, it's seems strange to me so I put it here if it could bu useful for other people ... I have the same as you getAnywhere(read.table)$where [1] package:base namespace:base

[R] [Rd] bug in windows GUI/script editor (PR#8288)

2005-11-09 Thread Duncan Mackay
Here's how I can reproduce this bug, running under MDI under WinXP 1) start Rgui 2) open a script window using FileNew script 3) click back in the console window and open a help window (e.g. by typing ?merge) in the console window 4) click in the close box of the help window 5) click in the close

[R] basic mac question

2005-11-09 Thread George Skountrianos
ok i got r 2.2.0 to work on my mac just fine but im having problems with when i try to create a new data set. when i go to new data...new data set it opens up the window. so i name my set but when i click ok the window does not go away. is this normal. also the data editor will not allow me to

Re: [R] how to convert strings back to values?

2005-11-09 Thread Dave Roberts
Eszter, I suspect the problem is different than you think. It's possible that when you read in the data it assumed that the first column was data, not row names, and so when you transpose the first column becomes the first row. Since it is alpha, all the columns become factors rather then

[R] [Rd] bug in windows GUI/script editor (PR#8288)

2005-11-09 Thread Duncan Mackay
P.S. I should have added that this crash occurred when the MDI toolbar was OFF. Here's how I can reproduce this bug, running under MDI under WinXP 1) start Rgui 2) open a script window using FileNew script 3) click back in the console window and open a help window (e.g. by typing ?merge) in the

Re: [R] polynomials transformation

2005-11-09 Thread Abd. Rahman Kassim
Dear Chuck, Thanks for your prompt reply. Abd. Rahman - Original Message - From: Chuck Cleland [EMAIL PROTECTED] To: Abd. Rahman Kassim [EMAIL PROTECTED] Cc: R-Help Discussion r-help@stat.math.ethz.ch Sent: Wednesday, November 09, 2005 6:04 PM Subject: Re: [R] polynomials

Re: [R] solve the quadratic equation ax^2+bx+c=0

2005-11-09 Thread Mike Prager
The inquiry below and similar ones seem a lot like homework problems. They are distinguished by showing no evidence of the OP's ever having read a manual and also by being problems of apparently pedagogical interest. The Fortran group (comp.lang.fortran) has a long tradition of not giving

Re: [R] basic mac question

2005-11-09 Thread John Fox
Dear George, I'm afraid that people won't understand the context of your question -- that is, that you're using the Rcmdr GUI, but that the crux of your problem as do with changing the names of variables in the data editor using R on a Mac. (As you know, I'm not a Mac user and unable to answer

Re: [R] [Rd] bug in windows GUI/script editor (PR#8288)

2005-11-09 Thread Duncan Murdoch
On 11/9/2005 6:16 PM, Duncan Mackay wrote: Here's how I can reproduce this bug, running under MDI under WinXP 1) start Rgui 2) open a script window using FileNew script 3) click back in the console window and open a help window (e.g. by typing ?merge) in the console window 4) click in the

Re: [R] Problem with Running Locfit

2005-11-09 Thread Liaw, Andy
Anil, If you can send me some data (off-list), I can try to see what's tripping you up. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of anil kumar rohilla Sent: Wednesday, November 09, 2005 3:54 AM To: r-help@stat.math.ethz.ch Subject: [R]

Re: [R] how to convert strings back to values?

2005-11-09 Thread Adaikalavan Ramasamy
Problems like these could be caused by improperly spaced columns. Try table(tdf1). If you see only 0 and 1, then you should be fine. However I suspect that you might see things like 0, 0, 1, 1 which means that there is a an extra space between the delimiters. Report back what you get and we

Re: [R] How to find statistics like that.

2005-11-09 Thread Adaikalavan Ramasamy
I think an alternative is to use a p-value from F distribution. Even tough it is not a statistics, it is much easier to explain and popular than 1/F. Better yet to report the confidence intervals. Regards, Adai On Wed, 2005-11-09 at 17:09 -0600, Mike Miller wrote: On Wed, 9 Nov 2005, Gao Fay

Re: [R] accident modified dataset. How can I recovery it?!

2005-11-09 Thread Adaikalavan Ramasamy
Please do not post thrice, especially within 23 min of the first post. Your problem is that cuckoos is located in DAAG package not the lattice package. I am guessing that at some point you loaded DAAG in the initial session but did not realise this on subsequent sessions. Next time, search

  1   2   >