[R] Vertical labels on axes overlap

2005-01-06 Thread Tomas Kalibera
Hello, when using horizontal labels (default) in plots on x-axis, R by default selects a subset of labels to plot so that the labels do not overlap. However, when using vertical labels, all labels are always drawn, even when they overlap. Is it a bug or do I have to adjust some magic parameter

Re: [R] Vertical labels on axes overlap

2005-01-06 Thread Uwe Ligges
Tomas Kalibera wrote: Hello, when using horizontal labels (default) in plots on x-axis, R by default selects a subset of labels to plot so that the labels do not overlap. However, when using vertical labels, all labels are always drawn, even when they overlap. Is it a bug or do I have to adjust

[R] Segmentation fault while using Mclust function of mclust library in R-2.0.1

2005-01-06 Thread Tae-Hoon Chung
Hi, all; I got an unusual error while using mclust library 2.1-7 on R 2.0.1. When I tried to run Mclust(rnorm(100)), I got segmentation fault error. Does anyone know what causes this problem? I came across the same problem even when I tried to run the example shown in Mclust help using iris data.

[R] Help for detrending

2005-01-06 Thread NDIKUMAGENGE Alice
Hello and Happy New year to Everybody, I am a new user of R and I am a little bit lost. I would like to know how tu use R for detrending, which kind of algorithms I have to use. Thank u very much and Sorry for my english I am Francophone. Alice [[alternative HTML version deleted]]

Re: [R] Tuning string matching

2005-01-06 Thread adi
Thank you all for your replies. Indeed I used: http://finzi.psych.upenn.edu/nmz.html as a search site. I used string match, instead of fuzzy string match. Fuzzy matching seems to me a rather complicated matter, whereas my initial idea about solving this problem was a bit simpler: - check all

Re: [R] Segmentation fault while using Mclust function of mclust library in R-2.0.1

2005-01-06 Thread Uwe Ligges
Tae-Hoon Chung wrote: Hi, all; I got an unusual error while using mclust library 2.1-7 on R 2.0.1. When I tried to run Mclust(rnorm(100)), I got segmentation fault error. Does anyone know what causes this problem? I came across the same problem even when I tried to run the example shown in Mclust

[R] casting lm.fit output to an lm object

2005-01-06 Thread Arne.Muller
Hello, Is it possible to cast the output of lm.fit to an lm object? I've 10,000 linear models for a gene expression experiment, all of which have the same model matrix. Maybe calling lm.fit on a model matrix and a data vector is faster than lm. I'd like to use each fit for an anova as well as

[R] library vcd for R rw2001

2005-01-06 Thread Anne
Is there an upgrate of the vcd library (visualisation of categorical data) for the latest R version? Trying to download it from CRAN I get URL /data/WWW/ftp/pub/R/bin/windows/contrib/r-release/vcd_0.1-3.4.zip was not found on this server. googling it, I found it for instance on

RE: [R] Rcmd check Error help

2005-01-06 Thread Martin Maechler
AndyL == Liaw, Andy [EMAIL PROTECTED] on Wed, 5 Jan 2005 20:09:14 -0500 writes: AndyL The recommended way, I believe, is to _install_ the AndyL package (say in some test directory) and try it out. AndyL Only when you have no problem loading the package in AndyL R from that

Re: [R] library vcd for R rw2001

2005-01-06 Thread Uwe Ligges
Anne wrote: Is there an upgrate of the vcd library (visualisation of categorical data) for the latest R version? Obviously, the most recent version appeared on CRAN on 14-Nov-2004. Trying to download it from CRAN I get URL /data/WWW/ftp/pub/R/bin/windows/contrib/r-release/vcd_0.1-3.4.zip was

Re: [R] *PACKAGE* vcd for R rw2001

2005-01-06 Thread Martin Maechler
Anne == Anne Piotet [EMAIL PROTECTED] on Thu, 6 Jan 2005 11:39:56 +0100 writes: Anne Is there an upgrate of the vcd library it's a *PACKAGE*, not a library ... Anne (visualisation of categorical data) for the latest R version? Anne Trying to download it from CRAN I get

Re: [R] library vcd for R rw2001

2005-01-06 Thread Anne
Thanks! it seems I had a very cumbersome way of installing libraries... Anne - Original Message - From: Uwe Ligges [EMAIL PROTECTED] To: Anne [EMAIL PROTECTED] Cc: R list r-help@stat.math.ethz.ch Sent: Thursday, January 06, 2005 11:55 AM Subject: Re: [R] library vcd for R rw2001

[R] How can one get scale for ellipses from plotcorr - like in paper of Duncan MURDOCH

2005-01-06 Thread Gregor GORJANC
Hello! I used plotcorr for display of correlation matrix. I understand the meaning of ellipses but if you show that nice graph to someone who does not it is ... So I would like to produce the scale of correlations coefficients from -1 to 1 by .1 and display corresponding ellipses. Since this

RE: [R] Tuning string matching

2005-01-06 Thread Stephen Upton
Adrian, As an exercise, I took the pseudocode on the wiki pages for the Levenshtein distance and programmed it in R. The code is below. I tested it for just 2 strings, so I'm not claiming that it *really* works, but it seems to. As you can see, I didn't add any error checking, and there is likely

[R] leave-one-out cross validation for randomForest

2005-01-06 Thread Liu, Xin
Dear all, Can I get the leave-one-out cross validation error of randomForest in R? I only found tune(), which got the 10-fold cross validation error. Thanks for any information. Xin LIU This e-mail is from ArraDx Ltd The e-mail and any files transmitted with it are

Re: [R] leave-one-out cross validation for randomForest

2005-01-06 Thread Uwe Ligges
Liu, Xin wrote: Dear all, Can I get the leave-one-out cross validation error of randomForest in R? I only found tune(), which got the 10-fold cross validation error. Thanks for any information. For example errorest() in package ipred can be used for cross-validation. I wonder which function

Re: [R] Targeting the elements that satisfy matching rules excluding the NA

2005-01-06 Thread Petr Pikal
Hi Giovanni I am not sure if it is the correct way but regexpr(a,as.character(df$V1))0 [1] FALSE TRUE FALSENA FALSE TRUE gives me the logical vector you would like to see. Cheers Petr On 5 Jan 2005 at 19:16, Giovanni Malerba wrote: Dear R-List, here my problem: a -

Re: [R] aggregate()

2005-01-06 Thread Petr Pikal
On 6 Jan 2005 at 16:55, Karla Meurk wrote: Hi, some time ago I asked R-help about aggregating data as a result I was able to put together some code which includes the line rain.ag - aggregate(newdata, list(hod6=cut(mindata,6 hours)), mean, na.rm=T) I also want to aggregate daily, and

RE: [R] Tuning string matching

2005-01-06 Thread Adrian DUSA
Oh this is excellent, Stephen. Now I can create a code to break the initial strings: name1 - Harry Harrington name2 - Harington Harry str1 - unlist(strsplit(name1, )) str2 - unlist(strsplit(name2, )) str1 [1] Harry Harrington str2 [1] Harington Harry and compare the words using your

[R] GLMM and crossed effects

2005-01-06 Thread Andrew Beckerman
Hi again. Perhaps a simple question this time I am analysing data with a dependent variable of insect counts, a fixed effect of site and two random effects, day, which is the same set of 10 days for each site, and then transect, which is nested within site (5 each). I am trying to fit

[R] different result from the same errorest() in library( ipred)

2005-01-06 Thread Liu, Xin
Dear all, Does anybody can explain this: different results got when all the same parameters are used in the errorest() in library ipred, as the following? errorest(Species ~ ., data=iris, model=randomForest, estimator = cv, est.para=control.errorest(k=3), mtry=2)$err [1] 0.0333

Re: [R] different result from the same errorest() in library( ipred)

2005-01-06 Thread Uwe Ligges
Liu, Xin wrote: Dear all, Does anybody can explain this: different results got when all the same parameters are used in the errorest() in library ipred, as the following? errorest(Species ~ ., data=iris, model=randomForest, estimator = cv, est.para=control.errorest(k=3), mtry=2)$err [1]

[R] RSvgDevice incomplete svg output

2005-01-06 Thread Lefebure Tristan
Hi I use RSvgDevice to output plot, and modify them using svg editor (inkscape or sodipodi on Linux). Some month ago, results were perfect. I did exactly the same analysis today on the same data, and unfortunatly the results are different. While looking to the svg file, it seems that all

[R] labels attached to variable names

2005-01-06 Thread Denis Chabot
Hi, Can we attach a more descriptive label (I may use the wrong terminology, which would explain why I found nothing on the FAQ) to variable names, and later have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand as ylab and xlab

[R] arrays emerging from tapply

2005-01-06 Thread BXC (Bendix Carstensen)
The code below illustrates some points about results from tapply that I find strange. I wonder if they are intended and if so why it is so. 1) When you make a table the dimnames is a *named* list, tapply returns an unnamed list. 2) data.frame behaves differently on an array and a table. Is

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Thomas Lumley
On Wed, 5 Jan 2005, Kjetil Brinchmann Halvorsen wrote: Liaw, Andy wrote: You could try googling for delta method. I believe MASS even has code for that... I believe you are thinking of an example in S Programming, which does automatic differentiation and the delta method. -thomas

[R] Generating Data mvrnorm and loops

2005-01-06 Thread Doran, Harold
Dear List: I am generating N datasets using the following Sigma-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4 ) mu-c(100,150,200,250) N=100 for(i in 1:N) { assign(paste(Data., i, sep=''), as.data.frame(cbind(seq(1:1000),(mvrnorm(n=1000, mu, Sigma) } With these

Re: [R] labels attached to variable names

2005-01-06 Thread Dimitris Rizopoulos
Hi Denis, maybe something like this could be helpful: x - rnorm(20, 75); attr(x, label) - Weight of Males y - rnorm(20, 60); attr(y, label) - Weight of Females plot. - function(x, y, ...) plot.default(x, y, xlab=attr(x, label), ylab=attr(y, label), ...) plot(x, y) plot.(x, y) Best,

Re: [R] Segmentation fault while using Mclust function of mclust library in R-2.0.1

2005-01-06 Thread Tim F Liao
Tae-Hoon, Your code worked with version 1.90: Mclust(rnorm(100)) best model: univariate normal with 1 groups averge/median classification uncertainty: 0 / 0 Warning message: optimal number of clusters occurs at min choice in: Mclust (rnorm(100)) The warning should be there because the

[R] nls - convergence problem

2005-01-06 Thread [EMAIL PROTECTED]
Dear list, I do have a problem with nls. I use the following data: test time conc dose 0.50 5.401 0.75 11.101 1.00 8.401 1.25 13.801 1.50 15.501 1.75 18.001 2.00 17.001 2.50 13.901 3.00 11.201 3.50 9.901 4.00 4.70

[R] position of labels in vis.gam or persp

2005-01-06 Thread Denis Chabot
Hi, Is there a way to control the position of labels in 3D plots such as that produced by vis.gam (in mgvc), or persp? Some of my plots have axis labels (titles) that collide with the tick labels. I have increased the margin around the plot so that there is plenty of space to move the axis

[R] Parametric Survival Models with Left Truncation, survreg

2005-01-06 Thread Brian D M Tom
Hi, I would like to fit parametric survival models to time-to-event data that are left truncated. I have checked the help page for survreg and looked in the R-help archive, and it appears that the R function survreg from the survival library (version 2.16) should allow me to take account of

Re: [R] boot package

2005-01-06 Thread Angelo Canty
Hi Nathan, sorry about the delay in responding. The test of whether all of the bootstrap values are equal is in the wrong place. I will correct it in the next release. Meanwhile, I think the simplest solution is to fix(boot.ci) and move the line if (const(t, min(1e-08,

RE: [R] (no subject)

2005-01-06 Thread Qun Shi
Thank you very much for your help. I'm gonna try right now.-Jean On Wed, 5 Jan 2005, Liaw, Andy wrote: Date: Wed, 5 Jan 2005 17:26:00 -0500 From: Liaw, Andy [EMAIL PROTECTED] To: 'Qun Shi' [EMAIL PROTECTED], Liaw, Andy [EMAIL PROTECTED] Cc: R-help@stat.math.ethz.ch Subject: RE: [R] (no

Re: [R] labels attached to variable names

2005-01-06 Thread Anne
I use Frank Harrell's library Hmisc to do this, it is very convenient! library(Hmisc) label(myVar)-my variable Anne - Original Message - From: Denis Chabot [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, January 06, 2005 3:40 PM Subject: [R] labels attached to variable

Re: [R] Help for detrending

2005-01-06 Thread Gabor Grothendieck
NDIKUMAGENGE Alice andikumagenge at businessdecision.com writes: I am a new user of R and I am a little bit lost. I would like to know how tu use R for detrending, which kind of algorithms I have to use. The following will remove a trend from vector y: resid(lm(y ~ seq(along = y)))

Re: [R] labels attached to variable names

2005-01-06 Thread Johan Lindbäck
Denis Chabot wrote: Hi, Can we attach a more descriptive label (I may use the wrong terminology, which would explain why I found nothing on the FAQ) to variable names, and later have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand

Re: [R] labels attached to variable names

2005-01-06 Thread Gabor Grothendieck
Denis Chabot chabotd at globetrotter.net writes: : : Hi, : : Can we attach a more descriptive label (I may use the wrong : terminology, which would explain why I found nothing on the FAQ) to : variable names, and later have an easy way to switch to these labels in : plots? I fear this is

Re: [R] Generating Data mvrnorm and loops

2005-01-06 Thread Dimitris Rizopoulos
Hi Harold, check the following: library(MASS) Sigma - matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400), 4, 4) mu - c(100,150,200,250) # generating N datasets and store in a list lis - lapply(1:10, mvrnorm, n=10, mu=mu, Sigma=Sigma) # `lis1' contains the extra column

[R] rbugs in linux

2005-01-06 Thread Ian Jonsen
Hi, I am trying to run the schools example in the rbugs library (running winbugs in linux via wine-20041201) but keep getting the following error. Note I have tested wine and winbugs to confirm that both are operational. Error in runBugs(bugs, script.file, n.chains, workingDir, useWine, wine,

Re: [R] Generating Data mvrnorm and loops

2005-01-06 Thread Uwe Ligges
Doran, Harold wrote: Dear List: I am generating N datasets using the following Sigma-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4 ) mu-c(100,150,200,250) N=100 for(i in 1:N) { assign(paste(Data., i, sep=''), as.data.frame(cbind(seq(1:1000),(mvrnorm(n=1000, mu, Sigma) }

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Kent Holsinger
Bill Shipley wrote: Hello, and please excuse this off-topic question, but I have not been able to find an answer elsewhere. Consider a value Z that is calculated using the product (or ratio) of two means X_mean and Y_mean: Z=X_mean*Y_mean. More generally, Z=f(X_mean, Y_mean). The standard error

Re: [R] labels attached to variable names

2005-01-06 Thread Frank E Harrell Jr
Denis Chabot wrote: Hi, Can we attach a more descriptive label (I may use the wrong terminology, which would explain why I found nothing on the FAQ) to variable names, and later have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand

Re: [R] arrays emerging from tapply

2005-01-06 Thread Peter Dalgaard
BXC (Bendix Carstensen) [EMAIL PROTECTED] writes: The code below illustrates some points about results from tapply that I find strange. I wonder if they are intended and if so why it is so. 1) When you make a table the dimnames is a *named* list, tapply returns an unnamed list. That

[R] Calculating a table of symbol frequencies

2005-01-06 Thread Wollenberg, Kurt R
Hello all: I have a protein sequence alignment in a data frame (align1, 72 x 236), where each row is a protein and each column a site in the alignment. AA is vector of amino acid symbols plus - (gap). I can calculate amino acid frequencies at each site by: align1.F -

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Spencer Graves
Of course, the delta method is terrible when the first derivative is small relative to the curvature. In that case, you either need to consider bootstrap, Monte Carlo, permutation testing, as suggested by Venables and Ripley in MASS and S Programming, or possibly using a higher order

[R] patterns of missing data: determining monotonicity

2005-01-06 Thread Michael Friendly
Here is a problem that perhaps someone out here has an idea about. It vaguely reminds me of something I've seen before, but can't place. Can anyone help? For multiple imputation, there are simpler methods available if the patterns of missing data are 'monotone' --- if Vj is missing then all

[R] package Zelig problem with setx

2005-01-06 Thread Anne
Hi! Does somebody out there has experience with the Zelig package from Harvard uni? I have a problem when trying to set the explanatory variables with setx Polytomous logistic regression: z.out - zelig(OPARS ~ v1+v2+v3+...+vn, model = mlogit, data=heb) that's OK x.out-set(z.out) Error in

Re: [R] Help for detrending

2005-01-06 Thread susana barbosa
Dear Alice, you may try stl decomposition ?stl Best, Susana -- Susana Barbosa http://www.fc.up.pt/pessoas/susana.barbosa Departamento de Matematica Aplicada Faculdade de Cincias, Universidade Porto Rua do Campo Alegre, 687, 4169-007, Porto Tel: 220 100 840 Fax: 220 100 809

RE: [R] Help for detrending

2005-01-06 Thread NDIKUMAGENGE Alice
Thank u Susana, I will try. Are u Statistician?? Message d'origine De: susana barbosa [mailto:[EMAIL PROTECTED] Date: jeu. 06/01/2005 17:57 À: r-help@stat.math.ethz.ch Cc: NDIKUMAGENGE Alice Objet: Re: [R] Help for

Re: [R] rbugs in linux

2005-01-06 Thread Ian Wilson
On my machine (SuSE 9.0) the following works. schools.sim - rbugs(data=schools.data, inits, parameters, schools.bug, n.chains=3, n.iter=1000, workingDir=/home/ijw/.wine/fake_windows/temp, bugs=/windows/c/Program

RE: [R] Calculating a table of symbol frequencies

2005-01-06 Thread Wiener, Matthew
Kurt -- If you create a vector of alignment positions, you should be able to do alignment.pos - rep(1:236, each = 72) table(data.frame(as.vector(align1), alignment.pos)) You may want to coerce align1 to a factor with appropriate levels, in case you are missing some amino acids. Otherwise

[R] animation without intermediate files?

2005-01-06 Thread Cari G Kaufman
Hello, Does anyone know how to make movies in R by making a sequence of plots? I'd like to animate a long trajectory for exploratory purposes only, without creating a bunch of image files and then using another program to string them together. In Splus I would do this using double.buffer()

[R] Help in Customising NLS function to spit out Mean and SD of the new fit!!!

2005-01-06 Thread Jagarlamudi, Choudary
Hi all, I'm trying to customize the nls function code to spit out the sd and mean of the new fit. All it gives me are the fitted values. THis function seems to work fine for my project otherwise. All i need is the SD and MEAN. Can someone help me to customise. I frankly did not understand the

[R] autoscaling plot font size in Sweave output possible?

2005-01-06 Thread Patrick Drechsler
Hi, I was wondering if it's possible to have fonts in plots to be autoscaled to the same font size used by LaTeX in a surrounding Sweave document. Here's a short example in which the fonts of the first plot are barely readable: --8schnipp-8---

[R] Survival Analysis with Long Time Survivors

2005-01-06 Thread IGOR QUIDIM
Hi, I was searching for the Survival Analysis with Long Time Survivors on Internet and I found the package gfcure for SPlus and R. Anyone uses this package? I have some problems to understand how it works... Thanks a lot, Igor __

Re: [R] Help in Customising NLS function to spit out Mean and SD of the new fit!!!

2005-01-06 Thread Spencer Graves
I'm very sorry, but I don't understand what you did and what you don't understand. Have you worked through the examples in the nls documentation? If you have and still have questions, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. In particular, please

[R] How to avoid rounding of matrix elements?

2005-01-06 Thread Ulas Karaoz
Hi all R-users, If I have a matrix with numeric elements as follows, the values are rounded when I try to refer to a specifici element using [], the value is rounded. The same thing happens if the matrix is read from a file, the values are stored to the correct precision but then when I try to

Re: [R] How to avoid rounding of matrix elements?

2005-01-06 Thread Tim F Liao
The signif() function doesn't increase the number significant digits beyond the default. However, if your purpose is simply to see more digits (or what was entered), a paste() function will do the trick though it will trim the trailing zeros. Other ways? Tim Original message

Re: [R] How to avoid rounding of matrix elements?

2005-01-06 Thread Don MacQueen
It's not being rounded, as this example will show: x - 0.1234567898765 x [1] 0.1234568 print(x,digits=15) [1] 0.1234567898765 It is being printed, or displayed, with fewer digits. But the underlying value has not changed. -Don At 6:57 PM -0500 1/6/05, Ulas Karaoz wrote: Hi all R-users, If I

RE: [R] How to avoid rounding of matrix elements?

2005-01-06 Thread Liaw, Andy
Use the digits option to print(): print(mdat, digits=20) [,1][,2] [,3][,4] [1,] 0.01879729490 1.0 0.010500242000 0.074216423 [2,] 0.444620854999800 0.000320438 1.108755638001 0.036289824 The output may look rounded,

Re: [R] How to avoid rounding of matrix elements?

2005-01-06 Thread Marc Schwartz
On Thu, 2005-01-06 at 18:57 -0500, Ulas Karaoz wrote: Hi all R-users, If I have a matrix with numeric elements as follows, the values are rounded when I try to refer to a specifici element using [], the value is rounded. The same thing happens if the matrix is read from a file, the values

RE: [R] How to avoid rounding of matrix elements?

2005-01-06 Thread John Fox
Dear Ulas, A number of people have suggested changing the print precision via the digits argument to print(), and have explained that what you see when a number is printed doesn't necessarily reflect the precision of the stored number. You can also reset the digits option, which defaults to 7.

[R] Windows package development: bad html links to functions in non-standard packages

2005-01-06 Thread Andrew Ward
I am using R 2.0.1 Patched on Windows 2000. I have created a binary package for Windows that builds, checks, installs and works without errors. In some of my .Rd files, I have links to functions in the standard packages supplied with R as well as links to others in add-on packages that I have

[R] Getting empirical percentiles for data

2005-01-06 Thread Mike Cheung
Dear List, I have some discrete data and want to calculate the percentiles and the percentile ranks for each of the unique scores. I can calculate the percentiles with quantile(). I know that ecdf can be used to calculate the empirical cumulative distribution. However, I don't know how to

[R] Basic Linear Algebra

2005-01-06 Thread Mulholland, Tom
I don't normally have to go anywhere near this stuff , but it seems to me that this should be a straight-forward process in R. For the purposes of this enquiry I thought I would use something I can work out on my own. So I have my matrix and the right hand results from that matrix tdata -

Re: [R] Windows package development: bad html links to functions in non-standard packages

2005-01-06 Thread Prof Brian Ripley
This is discussed in the documentation. E.g. rw-FAQ says 3.7 Hyperlinks in Compiled HTML sometimes do not work. == They may well not work between packages installed in different libraries. This is solved under Unix using symbolic links which