Re: [R] pstoedit

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote: Has onyone experience with pstoedit (http://www.pstoedit.net/pstoedit) to convert eps graphs generated by R on Linux to Windows formats (WMF or EMF)? Does this way work? Is there an other, better way? You can only do that using pstoedit on

Re: [R] lm() with many responses

2005-04-13 Thread Prof Brian Ripley
On Tue, 12 Apr 2005, John Pitney wrote: I have one array of predictors, one observation per row, and one array of responses, also arranged one observation per row. I arrange these into a data.frame and call lm() with a pasted-together formula. I would like to call lm() with a number of

[R] how to separate a string

2005-04-13 Thread Cuichang Zhao
hello, i wonder how is string represent in R. if i have a string s= hello, how can i refer to first character in the string s? also if i have s1 = hello.1, s2 = ok.1, how can i separate the s1 into hello 1 and s2 into ok and 1? I have tried to use the substring function, but i don't where i

[R] Re: how to separate a string

2005-04-13 Thread Rich FitzJohn
To get the first character from a string, use substr(s, 1, 1) To split strings at a period, use strsplit(s, \\.) (the period must be quoted, as . matches anything in a regular expression). To get the index for . in a string, see ?regexpr, but you will not need to do that if you use strsplit().

[R] [R-pkgs] New version of catspec package

2005-04-13 Thread John Hendrickx
I've uploaded a new version of catspec to CRAN. Catspec is for estimating certain special categorical models. It also contains ctab, a function for creating one-way, two-way, and multi-way percentage tables (nothing special there really). Ctab can now print more than one percentage type, as well

[R] Inf +1i vs 1+Inf*1i

2005-04-13 Thread Robin Hankin
Hi If I have a - Inf + 1i then Re(a) is Inf, and Im(a) is 1, as expected. But if b - 1 + Inf * 1i, then Im(b) = Inf , as expected, but Re(b) = NaN, which I didn't expect. Why this asymmetry? How to define an object with Re(b)=1, Im(b)=Inf? -- Robin Hankin Uncertainty Analyst Southampton

RE: [R] Inf +1i vs 1+Inf*1i

2005-04-13 Thread Oscar Rueda Palacio
Robin, You could try b - complex(real=1, im=Inf) -- scar Manuel Rueda Palacio Viceintervencin Consejera de Hacienda Junta de Castilla y Len Tfno: 983414092 e-mail: [EMAIL PROTECTED] -- -Mensaje

[R] Combine univariate time series

2005-04-13 Thread Joerg Klausen
Hallo everyone I have two univariate time series (class ts) describing the same variable. They have the same resolution, but span different periods in time with a big gap in between. I need to append one to the other such that they are one object, with the gap filled with NAs. The method

Re: [R] Inf +1i vs 1+Inf*1i

2005-04-13 Thread Martin Maechler
Robin == Robin Hankin [EMAIL PROTECTED] on Wed, 13 Apr 2005 08:51:19 +0100 writes: Robin Hi Robin If I have Robin a - Inf + 1i Robin then Robin Re(a) is Inf, and Im(a) is 1, as expected. Robin But if Robin b - 1 + Inf * 1i, Robin then Robin Im(b) =

Re: [R] Inf +1i vs 1+Inf*1i

2005-04-13 Thread Martin Maechler
Actually, the problem comes from Inf * 1i (or 1i * Inf) and the 0 * Inf |- NaN which of course is `correct' in general, but a bit undesirable in the rule (a + bi) * (c + di) = (ac - bd) + (ad + bc)i {and similarly in complex division}. Note that the same problem also leads to

[R] range.bars in stl

2005-04-13 Thread antonio rodríguez
Hi, In stlmethods(stats) says: range.bars logical indicating if each plot should have a bar at its right side which are of equal heights in user coordinates. I don't understand the meaning of: which are of equal heights in user coordinates I'm working with monthly time series, with a clear

[R] glm: mustart, different default for quasi and quasipoisson

2005-04-13 Thread Ulrich Halekoh
Hallo, for the quasipoisson family the default for mustart is y+ 0.1, for the quasi family with 'variance=mu' the default is y + 0.1 * (y == 0) I would like to know, whether the setting for quasipoisson is preferable for count data in relation to the quasi setting. regards Ulrich Ulrich

Re: [R] Combine univariate time series

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, Joerg Klausen wrote: I have two univariate time series (class ts) describing the same variable. They have the same resolution, but span different periods in time with a big gap in between. I need to append one to the other such that they are one object, with the gap filled

Re: [R] range.bars in stl

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, antonio rodríguez wrote: In stlmethods(stats) says: For informatively, in the help for plot.stl: range.bars logical indicating if each plot should have a bar at its right side which are of equal heights in user coordinates. I don't understand the meaning of: which are of

Re: [R] range.bars in stl

2005-04-13 Thread antonio rodrguez
El Miércoles, 13 de Abril de 2005 11:12, Prof Brian Ripley escribió: On Wed, 13 Apr 2005, antonio rodríguez wrote: In stlmethods(stats) says: For informatively, in the help for plot.stl: range.bars logical indicating if each plot should have a bar at its right side which are of equal

Re: [R] Inf +1i vs 1+Inf*1i

2005-04-13 Thread Robin Hankin
On Apr 13, 2005, at 09:40 am, Martin Maechler wrote: Actually, the problem comes from Inf * 1i (or 1i * Inf) and the 0 * Inf |- NaN which of course is `correct' in general, but a bit undesirable in the rule (a + bi) * (c + di) = (ac - bd) + (ad + bc)i thanks for this Martin. Now I

[R] abstol in nnet

2005-04-13 Thread Haleh Yasrebi
Hello All, I would like to know what fit criterion (abstol arg) is in nnet. Is it the threshold for the difference btw the max output and target values? Is the value at each iteration also the difference btw max of output and target values over all output units (case of multiple classes)? How

Re: [R] pstoedit

2005-04-13 Thread Ted Harding
On 13-Apr-05 Prof Brian Ripley wrote: On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote: Has onyone experience with pstoedit (http://www.pstoedit.net/pstoedit) to convert eps graphs generated by R on Linux to Windows formats (WMF or EMF)? Does this way work? Is there an other,

RE: [R] A suggestion for predict function(s)

2005-04-13 Thread Liaw, Andy
I must respectfully disagree. Why carry extra copies of data arround? This is probably OK for small to medium sized data, but definitely not for large data. Besides, in your example, it may do different things depending on whether newdata is supplied: model.matrix is not necessarily the same

Re: [R] R as programming language: references?

2005-04-13 Thread Peter Dalgaard
Jan T. Kim [EMAIL PROTECTED] writes: I don't know what Federico Calboli has in mind, but as for myself, upon starting with R, I've been looking for an R language reference in the style of the Python reference (http://docs.python.org/ref/ref.html). The specification of the grammar and the

[R] How to plot Contour with NA in dataframe

2005-04-13 Thread WeiQiang . Li
Dear friends, I am trying to produce Contour Plot with R, but there are some NA in my data matrix. After I ran the following R script, I got the error message:no proper `z' matrix specified. Does anybody know how to plot contour chart with R for the non-strict matrix? Thank

Re: [R] pstoedit

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005 [EMAIL PROTECTED] wrote: On 13-Apr-05 Prof Brian Ripley wrote: On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote: Has onyone experience with pstoedit (http://www.pstoedit.net/pstoedit) to convert eps graphs generated by R on Linux to Windows formats (WMF or EMF)?

Re: [R] How to plot Contour with NA in dataframe

2005-04-13 Thread Duncan Murdoch
[EMAIL PROTECTED] wrote: Dear friends, I am trying to produce Contour Plot with R, but there are some NA in my data matrix. After I ran the following R script, I got the error message:no proper `z' matrix specified. Does anybody know how to plot contour chart with R for the non-strict

Re: [R] Combine univariate time series

2005-04-13 Thread Gabor Grothendieck
On 4/13/05, Joerg Klausen [EMAIL PROTECTED] wrote: Hallo everyone I have two univariate time series (class ts) describing the same variable. They have the same resolution, but span different periods in time with a big gap in between. I need to append one to the other such that they are one

Re: [R] pstoedit

2005-04-13 Thread A.J. Rossini
On 4/13/05, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 13 Apr 2005 [EMAIL PROTECTED] wrote: On 13-Apr-05 Prof Brian Ripley wrote: On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote: Has onyone experience with pstoedit (http://www.pstoedit.net/pstoedit) to convert

Re: [R] functions(t.test) on variables by groups

2005-04-13 Thread Peter Dalgaard
Hai Lin [EMAIL PROTECTED] writes: Dear R users, I have a data frame with categorical Vars. Groups and a couple columns of numeric Vars. I am trying to make two-sample t.test on each variable(s01-s03) by Groups. A data generated as following: zot - data.frame(Groups=rep(letters[1:2],

[R] easy question: obtaining rw1080.exe

2005-04-13 Thread Wisz, Mary Susanne
Dear All, Can anyone please tell me where I can obtain uncompiled binary instalation files for R version 1.8. (i.e. rw1080.exe)? I can only find the uncompiled source code on CRAN today. Thank you, Mary Wisz [EMAIL PROTECTED] [[alternative HTML version deleted]]

Re: [R] pstoedit

2005-04-13 Thread Ted Harding
On 13-Apr-05 Prof Brian Ripley wrote: On Wed, 13 Apr 2005 [EMAIL PROTECTED] wrote: On 13-Apr-05 Prof Brian Ripley wrote: On Wed, 13 Apr 2005, BORGULYA [iso-8859-2] Gábor wrote: Has onyone experience with pstoedit (http://www.pstoedit.net/pstoedit) to convert eps graphs generated by

[R] install.packages and MacOS 10.3.8

2005-04-13 Thread Patrick Giraudoux
Dear Listers, I am trying to install packages via install.packages() from MacOS 10.3.8. Installing work fine when run from the menu, but the following command (useful for setting up each computer of the student computer room) leads nowhere for some reasons:

Re: [R] easy question: obtaining rw1080.exe

2005-04-13 Thread Uwe Ligges
Wisz, Mary Susanne wrote: Dear All, Can anyone please tell me where I can obtain uncompiled binary You mean compiled, for sure. instalation files for R version 1.8. (i.e. rw1080.exe)? Why do you want an outdated version of R? Binaries are not archived on CRAN. You can either try to compile

Re: [R] install.packages and MacOS 10.3.8

2005-04-13 Thread Uwe Ligges
Patrick Giraudoux wrote: Dear Listers, I am trying to install packages via install.packages() from MacOS 10.3.8. Installing work fine when run from the menu, but the following command (useful for setting up each computer of the student computer room) leads nowhere for some reasons:

[R] R binaries for UMBUTU Linux?

2005-04-13 Thread Derek Eder
Has anyone out there compiled R for the Umbutu Linux* (neé Debian) v. 5.04 distribution for Intel-type platforms (32 and 64 bit) ? Thank you, Derek Eder * Umbutu, a popular new Linux distribution, not a Nigerian scam, I promise!http://www.ubuntulinux.org/ -- Derek Eder SDS KLINIKEN Vasaplatsen

RE: [R] easy question: obtaining rw1080.exe

2005-04-13 Thread Liaw, Andy
From: Uwe Ligges Wisz, Mary Susanne wrote: Dear All, Can anyone please tell me where I can obtain uncompiled binary You mean compiled, for sure. instalation files for R version 1.8. (i.e. rw1080.exe)? Why do you want an outdated version of R? Binaries are not archived on

Re: [R] R binaries for Ubuntu (!) Linux?

2005-04-13 Thread Martin Maechler
When I set up an old weak PC to become a real workstation at home, by installing Ubuntu (spelling!), I was able to quickly get many debian packages that were not part of ubuntu proper (including R-base-dev, ess) by outcommenting something like universe (forgot the exact name) in the

Re: [R] R binaries for UMBUTU Linux?

2005-04-13 Thread Barry Rowlingson
Derek Eder wrote: Has anyone out there compiled R for the Umbutu Linux* (neé Debian) v. 5.04 distribution for Intel-type platforms (32 and 64 bit) ? * Umbutu, a popular new Linux distribution, not a Nigerian scam, I promise!http://www.ubuntulinux.org/ That's 'Ubuntu'. If you run the package

Re: [R] R binaries for UMBUTU Linux?

2005-04-13 Thread Peter Dalgaard
Derek Eder [EMAIL PROTECTED] writes: Has anyone out there compiled R for the Umbutu Linux* (neé Debian) v. 5.04 distribution for Intel-type platforms (32 and 64 bit) ? Thank you, Derek Eder Er, U*bun*tu, you mean? I believe you just use the standard Debian packages and tools like apt-get

Re: [R] R binaries for UMBUTU Linux?

2005-04-13 Thread Jari Oksanen
On Wed, 2005-04-13 at 15:19 +0200, Derek Eder wrote: Has anyone out there compiled R for the Umbutu Linux* (neé Debian) v. 5.04 distribution for Intel-type platforms (32 and 64 bit) ? Thank you, Derek Eder * Umbutu, a popular new Linux distribution, not a Nigerian scam, I promise!

[R] Binary Matrices

2005-04-13 Thread Mark Edmondson-Jones
I'm wanting to perform analysis (e.g. using eigen()) of binary matrices - i.e. matrices comprising 0s and 1s. For example: n-1000 test.mat-matrix(round(runif(n^2)),n,n) eigen(test.mat,only.values=T) Is there a more efficient way of setting up test.mat, as each cell only requires a binary

[R] questions about discriminant analysis

2005-04-13 Thread ronggui
i konw the lda and qda in MASS can do discriminant analysis.and lda complete the Fisher's method.and qda is the Quadratic discriminant analysis. 1,my first question is if qda do the Mahalanobis's method? 2,as some textbook say,when using fisher's method,we proceed by assuming that the

Re: [R] Binary Matrices

2005-04-13 Thread Uwe Ligges
Mark Edmondson-Jones wrote: I'm wanting to perform analysis (e.g. using eigen()) of binary matrices - i.e. matrices comprising 0s and 1s. For example: n-1000 test.mat-matrix(round(runif(n^2)),n,n) eigen(test.mat,only.values=T) Is there a more efficient way of setting up test.mat, as each cell

Re: [R] Binary Matrices

2005-04-13 Thread Dimitris Rizopoulos
you mean something like this: matrix(sample(0:1, n*n, TRUE), n, n) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015

[R] Data Mining in Europe, please advise

2005-04-13 Thread Lisa Solomon
Our CEO, Dr. Dan Steinberg, is planning to visit Europe in May. He would like the opportunity to introduce statisticians (and statistically minded people) to data mining, data mining applications and to forefront data mining tools. Our algorithms are probably familiar to many statisticians

RE: [R] Binary Matrices

2005-04-13 Thread Huntsinger, Reid
Actually n^2 doubles. You could insert as.integer() around the call to round(runif()), to make the matrix have storage mode integer, but when you call eigen you need a matrix of doubles anyway, so you're not really saving space. If your matrices are large and have mostly zeros, you might benefit

Re: [R] R binaries for UMBUTU Linux?

2005-04-13 Thread Dirk Eddelbuettel
Peter Dalgaard p.dalgaard at biostat.ku.dk writes: Derek Eder derek.eder at sdskliniken.se writes: Has anyone out there compiled R for the Umbutu Linux* (ne Debian) v. 5.04 distribution for Intel-type platforms (32 and 64 bit) ? [...] Er, U*bun*tu, you mean? I believe you just use the

Re: [R] Perhaps Off-topic lme question

2005-04-13 Thread Douglas Bates
Berton Gunter wrote: A question on lme() : details: nlme() in R 2.1.0 beta or 2.0.1 The data,y, consisted of 82 data value in 5 groups of sizes 3 9 8 28 34 . I fit a simple one level random effects model by: myfit - lme( y~1, rand = ~1|Group) The REML estimates of between and within Group

[R] Fluctuating asymmetry and measurement error

2005-04-13 Thread Andrew Higginson
Hi all, Has anyone tested for FA in R? I need to seperate out the variance due to measurement error from variation between individuals (following Palmer Strobeck 1986). Andy Higginson Animal Behaviour and Ecology Research Group School of Biology University of Nottingham NG7 2RD U.K.

[R] Behavior of apply() when used with start()

2005-04-13 Thread Fernando Saldanha
Can someone explain why starts1 and starts2 are diffferent in the example below? After running this program a - c(1:3) b - c(2:3) tsa - ts(a) tsb - ts(b, start = 2) arr - cbind(tsa, tsb) starts1 - cbind(start(tsa), start(tsb)) starts2 - apply(arr, 2, start) I get: starts1 [,1] [,2] [1,]

RE: [R] Binary Matrices

2005-04-13 Thread Liaw, Andy
-Original Message- From: Uwe Ligges Mark Edmondson-Jones wrote: I'm wanting to perform analysis (e.g. using eigen()) of binary matrices - i.e. matrices comprising 0s and 1s. For example: n-1000 test.mat-matrix(round(runif(n^2)),n,n) eigen(test.mat,only.values=T)

RE: [R] Binary Matrices

2005-04-13 Thread Mark Edmondson-Jones
1000x1000 is only indicative. I need to generate larger (adjacency) matrices using a variety of models. Most are sparse, with a high proportion of zeros and so SparseM sounds very promising. I will investigate. Thanks, Mark Liaw, Andy [EMAIL PROTECTED] 13/04/2005 -Original

Re: [R] install.packages and MacOS 10.3.8

2005-04-13 Thread Patrick Giraudoux
Dear Uwe, That install.binaries() was exactly what I needed... Thanks a lot. Uwe Ligges a écrit : Patrick Giraudoux wrote: Dear Listers, I am trying to install packages via install.packages() from MacOS 10.3.8. Installing work fine when run from the menu, but the following command (useful for

[R] R in Windows

2005-04-13 Thread George Kelley
Has anyone tried to create dialog boxes for Windows in R so that one doesn't have to type in so much information but rather enter it in a menu-based format. If not, does anyone plan on doing this in the future if it's possible? Thanks. George (Kelley) George A. Kelley, DA, FACSM Professor

RE: [R] Perhaps Off-topic lme question

2005-04-13 Thread Berton Gunter
Many thanks, Doug. Your explanation was clear and informative. I appreciate your taking the time. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA __ R-help@stat.math.ethz.ch mailing list

Re: [R] pstoedit

2005-04-13 Thread Mike Prager
Ted, Have you tried bringing the eps files directly into Word? The version I am using (Word 2002 = Word 10.x) can incorporate eps files and even generates its own previews. Maybe you don't need to make the conversion at all. Regards, ...Mike At 4/13/2005 04:36 AM, you wrote: On 13-Apr-05 Prof

Re: [R] How to plot Contour with NA in dataframe

2005-04-13 Thread Earl F. Glynn
Duncan Murdoch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Your problem isn't the NA values, it's the fact that the contour functions want a matrix, and you're passing a data.frame. If you use as.matrix on it, it converts to character mode, presumably

Re: [R] R in Windows

2005-04-13 Thread Marc Schwartz
On Wed, 2005-04-13 at 10:51 -0400, George Kelley wrote: Has anyone tried to create dialog boxes for Windows in R so that one doesn't have to type in so much information but rather enter it in a menu-based format. If not, does anyone plan on doing this in the future if it's possible? Thanks.

[R] logistic regression weights problem

2005-04-13 Thread Federico Calboli
Hi All, I have a problem with weighted logistic regression. I have a number of SNPs and a case/control scenario, but not all genotypes are as guaranteed as others, so I am using weights to downsample the importance of individuals whose genotype has been heavily inferred. My data is quite big,

RE: [R] Binary Matrices

2005-04-13 Thread Martin Maechler
Mark == Mark Edmondson-Jones [EMAIL PROTECTED] on Wed, 13 Apr 2005 15:40:26 +0100 writes: Mark 1000x1000 is only indicative. I need to generate Mark larger (adjacency) matrices using a variety of models. Mark Most are sparse, with a high proportion of zeros and Mark so

Re: [R] lme problem

2005-04-13 Thread Henric Nilsson
Milos Zarkovic said the following on 2005-04-12 16:40: I have recently started using R. For the start I have tried to repeat examples from Milliken Johnson Analysis of Messy Data - Analysis of Covariance, but I can not replicate it in R. The example is chocolate chip experiment. Response

Re: [R] Fitting a mixed negative binomial model

2005-04-13 Thread Henric Nilsson
Ben Bolker said the following on 2005-04-12 21:40: This is a little bit tricky (nonlinear, mixed, count data ...) Off the top of my head, without even looking at the documentation, I think your best bet for this problem would be to use the weights statement to allow the variance to be

Re: [R] Behavior of apply() when used with start()

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, Fernando Saldanha wrote: Can someone explain why starts1 and starts2 are diffferent in the example below? Yes, at least one person can. Actually, anyone who looked could: arr Time Series: Start = 1 End = 3 Frequency = 1 tsa tsb 1 1 NA 2 2 2 3 3 3 Note the times

Re: [R] R in Windows

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, Marc Schwartz wrote: On Wed, 2005-04-13 at 10:51 -0400, George Kelley wrote: Has anyone tried to create dialog boxes for Windows in R so that one doesn't have to type in so much information but rather enter it in a menu-based format. If not, does anyone plan on doing this in

[R] Normalization and missing values

2005-04-13 Thread Chris Bergstresser
Hi all -- I've got a large dataset which consists of a bunch of different scales, and I'm preparing to perform a cluster analysis. I need to normalize the data so I can calculate the difference matrix. First, I didn't see a function in R which does normalization -- did I miss it? What's

Re: [R] logistic regression weights problem

2005-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2005, Federico Calboli wrote: I have a problem with weighted logistic regression. I have a number of SNPs and a case/control scenario, but not all genotypes are as guaranteed as others, so I am using weights to downsample the importance of individuals whose genotype has been

[R] Summary: GLMMs: Negative Binomial family in R

2005-04-13 Thread nflynn
Here is a summary of responses to my original email (see my query at the bottom). Thank you to Achim Zeileis , Anders Nielsen, Pierre Kleiber and Dave Fournier who all helped out with advice. I hope that their responses will help some of you too. *

[R] Anova for GLMM (lme4) is a valid method?

2005-04-13 Thread Ronaldo Reis-Jr.
Hi, I try to make a binomial analysis using GLMM in a longitudinal data file. Is correct to use anova(model) to access the significance of the fixed terms? Thanks Ronaldo -- Todos somos iguais perante a lei, mas nao perante os encarregados de faze-las cumprir. -- S. Jerzy Lec -- | // |

RE: [R] Normalization and missing values

2005-04-13 Thread Berton Gunter
Normalization: ?scale -- or, more usually, an argument in the clustering function (see package cluster where stand is the argument in the various functions. Other packages may have similar capabilties). Missing Values: A HUGE and COMPLEX issue. One Reference: ANALYSIS OF INCOMPLETE MULTIVARIATE

Re: [R] Binary Matrices

2005-04-13 Thread Barry Rowlingson
Martin Maechler wrote: As others have said, you can use either 'SparseM' or 'Matrix'. The latter has also good code for sparse matrices, and actually I know that Doug Bates was going to implement sparse logical matrices in the next few days. The old 8-bit assembly language programmer in me baulks

Re: [R] Fitting a mixed negative binomial model

2005-04-13 Thread Ben Bolker
I *think* (but am not sure) that these guys were actually (politely) advertising a commercial package that they're developing. But, looking at the web page, it seems that this module may be freely available -- can't tell at the moment. Ben On Wed, 13 Apr 2005, Henric Nilsson wrote: Ben

RE: [R] Normalization and missing values

2005-04-13 Thread Rolf Turner
Bert Gunter wrote: You can't expect statistical procedures to rescue you from poor data. That should ***definitely*** go into the fortune package data base!!! cheers, Rolf Turner

Re: [R] Behavior of apply() when used with start()

2005-04-13 Thread Fernando Saldanha
Maybe one person can, but I am not sure who is that person. When I called starts2 - apply(arr, 2, start) I was not asking for the attibutes of the whole matrix. It rather seems to me that cbind() is the culprit. When it copies the time series tsa and tsb it seems to reset their start

Re: [R] Normalization and missing values

2005-04-13 Thread Jonathan Baron
On 04/13/05 11:36, Chris Bergstresser wrote: Hi all -- I've got a large dataset which consists of a bunch of different scales, and I'm preparing to perform a cluster analysis. I need to normalize the data so I can calculate the difference matrix. First, I didn't see a function in R

Re: [R] Normalization and missing values

2005-04-13 Thread Wensui Liu
before I know the scale() function, I just do it by coding it myself. But probably you could find some cool stuffs in dprep library. I've never tried it anyway. for missing values, it is way more complex and also depends on the methodology you are going to use. some methods are more tolerant to

Re: [R] Normalization and missing values

2005-04-13 Thread Achim Zeileis
On Wed, 13 Apr 2005 14:33:25 -0300 (ADT) Rolf Turner wrote: Bert Gunter wrote: You can't expect statistical procedures to rescue you from poor data. That should ***definitely*** go into the fortune package data base!!! :-) added for the next release. Z

[R] extracting one element of correlation matrices from a list poroduced by the 'by' statement

2005-04-13 Thread Mohammad A. Chaudhary
I am producing 2X2 correlation matrices by a class variable. I need to extract a vector of correlation coefficients only. I am doing that in a loop (see below) but I am sure there would be a simpler way. Please help! by(d1[,c(2,3)],d1[,1],cor) d1[, 1]: 1 c e c 1.000

[R] GAMM in mgcv - degrees of freedom for smooth terms

2005-04-13 Thread SwainD
Is it possible to set the degrees of freedom for the smooth term in a gamm to a specfic value? This can be done using gam in mgcv as follows: tst.gam-gam(y~s(x, k=6, fx=T)) However, this doesn't seem to work with gamm: tst.gamm-gamm(y~s(x, k=6, fx=TRUE, bs=cr)) Instead, this

[R] GAMM in mgcv - significance of smooth terms

2005-04-13 Thread SwainD
In the summary of the gam object produced by gamm, the Approximate significance of smooth terms appears to be a test of the improvement in fit over a linear model, rather than a test of the significance of the overall effect of x on y: test.gamm-gamm(y~te(x, bs=cr), random=list(grp=~1))

Re: [R] Normalization and missing values

2005-04-13 Thread WeiWei Shi
the way of scaling, IMHO, really depends on the distribution of each column in your original files. if each column in your data follows a normal distrbution, then a standard normalization will fit your requirement. My previous research in microarray data shows me a simple linear standardization

[R] Fitting a mixed negative binomial model

2005-04-13 Thread dave fournier
I *think* (but am not sure) that these guys were actually (politely) advertising a commercial package that they're developing. But, looking at the web page, it seems that this module may be freely available -- can't tell at the moment. Ben The Software for negative binomial mixed models

RE: [R] Normalization and missing values

2005-04-13 Thread Ted Harding
On 13-Apr-05 Berton Gunter wrote: You can't expect statistical procedures to rescue you from poor data. But they can kiss it better. (:-x) Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861

[R] Re: [R-SIG-Mac] BUG in RODBC with OS X?

2005-04-13 Thread Simon Urbanek
Just for the record - this problem concerns Actual drivers for Mac OS X 10.3 (later OS X versions are not affected). The current temporary work-around is to install iODBC Runtime supplied with the Actual drivers and compile RODBC as follows (in bash assuming sufficient privileges):

[R] generalized regression neural nets

2005-04-13 Thread Wensui Liu
Is there a R package that can do GRNN? Thanks. __ 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] extracting one element of correlation matrices from a list poroduced by the 'by' statement

2005-04-13 Thread Peter Dalgaard
Mohammad A. Chaudhary [EMAIL PROTECTED] writes: I am producing 2X2 correlation matrices by a class variable. I need to extract a vector of correlation coefficients only. I am doing that in a loop (see below) but I am sure there would be a simpler way. Please help!

Re: [R] logistic regression weights problem

2005-04-13 Thread Federico Calboli
On Wed, 2005-04-13 at 17:42 +0100, Prof Brian Ripley wrote: Use the cbind(yes, no) form of specification. Note though that the `weights' in a GLM are case weights and not arbitrary downweighting factors and aspects of the output (e.g. AIC, anova) depend on this. A different implementation

RE: [R] extracting one element of correlation matrices from a list poroduced by the 'by' statement

2005-04-13 Thread Mohammad A. Chaudhary
Great! Thank you very much. Looks R has unlimited possibilities. Regards, Ashraf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard Sent: Wednesday, April 13, 2005 4:11 PM To: Mohammad A. Chaudhary Cc: r-help@stat.math.ethz.ch Subject: Re: [R]

[R] i param in for loop does not takes zeros?

2005-04-13 Thread Francisco J. Zagmutt
Hi all Is there any reason why the parameter i in a for loop ignores a value of zero? For example sim=c() p=.2 for(i in 0:5) {sim[i]=dbinom(i,5,p) } sim [1] 0.40960 0.20480 0.05120 0.00640 0.00032 In this example the quantile i= 0 was ignored since dbinom(0,5,p) [1] 0.32768 The same behaviour

[R] terminate R program when trying to access out-of-bounds array element?

2005-04-13 Thread Vivek Rao
I want R to stop running a script (after printing an error message) when an array subscript larger than the length of the array is used, for example x = c(1) print(x[2]) rather than printing NA, since trying to access such an element may indicate an error in my program. Is there a way to get

Re: [R] i param in for loop does not takes zeros?

2005-04-13 Thread Rich FitzJohn
The for loop is not ignoring the zero at all, but the assignment is, since R indexes starting at 1, not zero. sim - c() sim[0] - 1 sim numeric(0) To run this loop this way, you need to add one to the index: for ( i in 0:5 ) sim[i+1] - dbinom(i, 5, p) However, you'd be better off passing

Re: [R] i param in for loop does not takes zeros?

2005-04-13 Thread Francisco J. Zagmutt
Thanks to Rich, Douglas and Erin. Off course the problem was the index! I was looking at the wrong place!! Thanks for your help! Francisco From: Rich FitzJohn [EMAIL PROTECTED] Reply-To: Rich FitzJohn [EMAIL PROTECTED] To: Francisco J. Zagmutt [EMAIL PROTECTED] CC: R-help@stat.math.ethz.ch

Re: [R] terminate R program when trying to access out-of-bounds array element?

2005-04-13 Thread Rich FitzJohn
Hi, You could try redefining [, so that if any element subsetted returned an NA, it would throw an error, e.g.: (Warning: Largely untested! - this will almost certainly cause problems in other classes that use [ to subset. Possibly defining this as [.default would be better...) [ - function(x,

RE: [R] terminate R program when trying to access out-of-bounds arrayelement?

2005-04-13 Thread Berton Gunter
WHOA! Do not redefine R functions (especially [ !) in this way! That's what R classes and methods (either S3 or S4) are for. Same applies to print methods. See the appropriate sections of the R language definition and the book S PROGRAMMING by VR. Please do not offer advice of this sort if you

[R] barplot usage

2005-04-13 Thread Antonio Olinto
Hi, I’m trying to make a barplot with the following dataframe, with information on relative frequency per sediment type (ST) for some species: Species ST1 ST2 ST3 SP_A 10 6030 ... At x-axis are (should be ...) the species names and at y-axis the frequency per sediment, in stacked

RE: [R] terminate R program when trying to access out-of-bounds arrayelement?

2005-04-13 Thread Marc Schwartz
On Wed, 2005-04-13 at 15:03 -0700, Berton Gunter wrote: WHOA! Do not redefine R functions (especially [ !) in this way! That's what R classes and methods (either S3 or S4) are for. Same applies to print methods. See the appropriate sections of the R language definition and the book S

RE: [R] terminate R program when trying to access out-of-bounds a rray element?

2005-04-13 Thread Liaw, Andy
As Bert said, redefining functions like [ is surely inadvisable, because of possibility of breaking codes that depend on the intended behavior. This is a language _feature_. If the problem is indexing beyond array extent, just check for it: Are any values that are going to be used for indexing

Re: [R] barplot usage

2005-04-13 Thread Marc Schwartz
On Wed, 2005-04-13 at 19:05 -0300, Antonio Olinto wrote: Hi, Im trying to make a barplot with the following dataframe, with information on relative frequency per sediment type (ST) for some species: Species ST1 ST2 ST3 SP_A 10 6030 ... At x-axis are (should be ...)

Re: [R] A suggestion for predict function(s)

2005-04-13 Thread Ross Darnell
Liaw, Andy wrote: I must respectfully disagree. Why carry extra copies of data arround? This is probably OK for small to medium sized data, but definitely not for large data. Besides, in your example, it may do different things depending on whether newdata is supplied: model.matrix is not

Re: [R] terminate R program when trying to access out-of-bounds array element?

2005-04-13 Thread Tony Plate
One way could be to make a special class with an indexing method that checks for out-of-bounds numeric indices. Here's an example for vectors: setOldClass(c(oobcvec)) x - 1:3 class(x) - oobcvec x [1] 1 2 3 attr(,class) [1] oobcvec [.oobcvec - function(x, ..., drop=T) { +if

Re: [R] terminate R program when trying to access out-of-bounds array element?

2005-04-13 Thread Tony Plate
Oops. The message in the 'stop' should be something more like numeric index out of range. -- Tony Plate Tony Plate wrote: One way could be to make a special class with an indexing method that checks for out-of-bounds numeric indices. Here's an example for vectors: setOldClass(c(oobcvec))

[R] multinom and contrasts

2005-04-13 Thread array chip
Hi, I found that using different contrasts (e.g. contr.helmert vs. contr.treatment) will generate different fitted probabilities from multinomial logistic regression using multinom(); while the fitted probabilities from binary logistic regression seem to be the same. Why is that? and for

[R] Map a string to an object

2005-04-13 Thread Fernando Saldanha
Is there a way in R to get an object whose name is given by a string? That is, like a function getObject(mystring) such that getObject('astring') returns the object astring (assuming it exists)? Thanks. FS __ R-help@stat.math.ethz.ch mailing list

Re: [R] Map a string to an object

2005-04-13 Thread Marc Schwartz
On Wed, 2005-04-13 at 19:46 -0400, Fernando Saldanha wrote: Is there a way in R to get an object whose name is given by a string? That is, like a function getObject(mystring) such that getObject('astring') returns the object astring (assuming it exists)? Thanks. Yep. You are close.

  1   2   >