Re: [R] read.spss and umlaut

2006-08-04 Thread Thomas Kuster
Hello Am Donnerstag, 3. August 2006 15.34 schrieb Thomas Lumley: On Thu, 3 Aug 2006, Thomas Kuster wrote: Hello Am Mittwoch, 2. August 2006 17.11 schrieb Thomas Lumley: ... You haven't shown anything that indicates that the C code stopped reading. More likely R just stops displaying when

Re: [R] gnlsControl

2006-08-04 Thread Dieter Menne
Daniel Coleman coleman.daniel at gene.com writes: When I run gnls I get the error: Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal, data = xy, : step factor 0.000488281 reduced below 'minFactor' of 0.000976563 My first thought was to decrease minFactor but

Re: [R] Questions about sweave...

2006-08-04 Thread Dieter Menne
Brian Lunergan ff809 at ncf.ca writes: Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions. This will be kind of wordy as I will

[R] geodesic distance (solution)

2006-08-04 Thread stefano iacus
Hi, has anyone ever seen implemented in R the following geodesic distance between positive definite pxp matrices A and B? d(A,B) = \sum_{i=1}^p (\log \lambda_i)^2 were \lambda is the solution of det(A -\lambda B) = 0 thanks stefano as I received few private email on the

Re: [R] Building a random walk vector

2006-08-04 Thread Ben Bolker
Matthew Wilson matt at overlook.homelinux.net writes: I'm studying R in my free time. I want to build a vector where each element is equal to the element before it in the sequence plus some random tweak. You will probably get many answers to this, but I think vec -

[R] need sample parallelized R scripts

2006-08-04 Thread Deomano, Emily \(IRRI\)
Good day to everyone. I'm working on computing correlation for several datasets (one dataset for each chromosome).  Computation is done several thousand times for each dataset which at present takes around 13 hours. We have a HPC machine with MPI.  snow package and R 2.3.1 running in Linux

[R] Integration and Loop in R

2006-08-04 Thread Lorenzo Isella
Dear All, I have seldom needed to use loops in R, but now I need to code a loop with a stride different from one. In the R manual I downloaded I have the example: xc - split(x, ind) yc - split(y, ind) for (i in 1:length(yc)) { plot(xc[[i]], yc[[i]]); abline(lsfit(xc[[i]], yc[[i]])) }

Re: [R] bullseye or polar display of circular data

2006-08-04 Thread Jim Lemon
Michael Jerosch-Herold wrote: I have data for several rings of a left heart chamber, and which I would like to display in concentric rings, with color-encoding of the values. Each ring corresponds to one slice through the heart, and the rings correspond to positions from the base to the

[R] prettyR arrives

2006-08-04 Thread Jim Lemon
Hi all, I have finally gotten the prettyR package going (many thanks to Kurt Hornik for his patience). prettyR is a set of functions that allows the user to produce HTML output from R scripts. Given an R script that runs properly, an HTML listing complete with embedded graphics can be

Re: [R] Looking for transformation to overcome heterogeneity of variances

2006-08-04 Thread Paul Smith
Thanks to all contributors for the fruitfulness of this discussion. I am speculating about a simpler solution: to use a non-parametric approach. To avoid the requirement of having normal residuals, Frank Harrell has suggested here the following non-parametric procedure: library(Design) # also

[R] User input from keyboard

2006-08-04 Thread chiya sharma
Dear All, Can anybody tell me the syntax for User input from keyboard in R. I mean to say that if I run the program it should ask Please enter the date at the begining of the program. I am using R-2.2.1 for windows. Any help will be greatly appreciated. thanks in advance. Regards, Chiya

[R] Data frame referencing?

2006-08-04 Thread Sander Oom
Dear R users, When you do: x - rnorm(10) y - rnorm(10) z - rnorm(10) a - data.frame(x,y,z) a$x [1] 1.37821893 0.21152756 -0.55453182 -2.10426048 -0.08967880 0.03712110 [7] -0.80592149 0.07413450 0.15557671 1.22165341 Why does this not work: a[a$y0.5,y] -1 Error in

Re: [R] Data frame referencing?

2006-08-04 Thread Gabor Grothendieck
When specifying a column name with [ the name must be quoted (unlike when using it with $): a[a$y 0.5, y] - 1 On 8/4/06, Sander Oom [EMAIL PROTECTED] wrote: Dear R users, When you do: x - rnorm(10) y - rnorm(10) z - rnorm(10) a - data.frame(x,y,z) a$x [1] 1.37821893

[R] Problem with installing R under Windows

2006-08-04 Thread TAN Chong Hui
I have been trying to install R under Windows from the source by following the instructions in R Installation and Adminstration. Met with a list of problems along the way. 1) Recommended packages: I tried to do make lnik-recommended and make rsync-recommended In both cases, I got the

Re: [R] between-within anova: aov and lme

2006-08-04 Thread William Simpson
Well nobody answered :-( Nobody on R-help is doing anovas I guess -- I don't blame them! (It's just for aggies.) In the absence of any response and for no good reason I am doing: fitn1 - aov(amplitude ~ stereo*site*stimulus + Error(subject), stereon1) This is Bill Venables's way. And when the

Re: [R] Data frame referencing?

2006-08-04 Thread Dimitris Rizopoulos
you need to use quotes, i.e., a[a$y 0.5, y] - 1 you can also use a$y[a$y 0.5] - 1 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:

Re: [R] User input from keyboard

2006-08-04 Thread Petr Pikal
Hi cat(\n,Enter x,\n) # prompt y-scan(n=1) prompts for user imput and scans 1 line from console. HTH Petr On 4 Aug 2006 at 17:06, chiya sharma wrote: Date sent: Fri, 4 Aug 2006 17:06:38 +0530 From: chiya sharma [EMAIL PROTECTED] To:

Re: [R] Data frame referencing?

2006-08-04 Thread Sander Oom
Dear Gabor and Dimitris, Simple, once you know! It is these little exceptions on the R notation that get me stuck. Now I am on the loose again! Thanks, Sander. Dimitris Rizopoulos wrote: you need to use quotes, i.e., a[a$y 0.5, y] - 1 you can also use a$y[a$y 0.5] - 1 I hope

[R] Sweave special token \\ from R to latex

2006-08-04 Thread Jan Wijffels
Dear helpeRs, I would like to specify a newline command in R and pass it to latex via Sweave such that it corresponds to latex' \\ command. But that doesn't seem to be possible. If I Sweave the \n character, it just makes a new line in latex but not the \\ command. Is there a way such that

Re: [R] User input from keyboard

2006-08-04 Thread Prof Brian Ripley
On Fri, 4 Aug 2006, Petr Pikal wrote: Hi cat(\n,Enter x,\n) # prompt y-scan(n=1) prompts for user imput and scans 1 line from console. (that scans one number: use readLines(n=1) to get a string). But readline() is probably easier. HTH Petr On 4 Aug 2006 at 17:06, chiya sharma

Re: [R] Sweave special token \\ from R to latex

2006-08-04 Thread Markus J�ntti
Jan Wijffels wrote: Dear helpeRs, I would like to specify a newline command in R and pass it to latex via Sweave such that it corresponds to latex' \\ command. But that doesn't seem to be possible. If I Sweave the \n character, it just makes a new line in latex but not the \\ command. Is

Re: [R] plotting picture data

2006-08-04 Thread Ritwik Sinha
Just a suggestion. It seems like each square can be denoted by x and y coordinates. Then you essentially have a two dimensional histogram/density that you need to plot. You can use the lattice functions cloud/wireframe. You can also go for a heat map/contour plot, the lattice functions for that

Re: [R] plotting picture data

2006-08-04 Thread Petr Pikal
Hi seems to me that it can be done by image. See ?image. Just as illustration. mat-matrix(sample(c(1,rep(2,10), rep(3,50)), 1000, replace=T), 100,100) for(i in 1:6) mat[i,c(1:(50-5*i),(50+5*i):100)]-NA for(i in 14:9) mat[i,c(1:(50-5*(15-i)),(50+5*(15-i)):100)]-NA image(1:100,1:100,mat) HTH

Re: [R] read.spss and umlaut

2006-08-04 Thread Thomas Lumley
On Fri, 4 Aug 2006, Thomas Kuster wrote: If I change the translatable characters (overwrite the 0 between :#@'= and ~000 with ÄÖÜäöü). I can read in the file an every ÄÖÜäöü ist a withspace: Ok, that's the problem then. The file format says that the umlauts are unreadable and R is believing

[R] question

2006-08-04 Thread Jessica G.
Hi Mr Plate, I have a little question How to convert a rowname vector of numbers into a real column of the matrix, My problem is that I applied a rowsum function on a matrix. Then I get a matrix in which the names of the columns are the values of the group (numbers) Now I need to make

[R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Andrew Kniss
I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines. However, to make it technically correct for publication, I also need to use superscript in the label. For

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines. However, to make it technically correct for

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Use atop: plot(1, main = expression(atop( ^14*C*-glyphosate line, line2))) On 8/4/06, Andrew Kniss [EMAIL PROTECTED] wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Sorry, you wanted a ylab=, not a main=. Try using xyplot in lattice: library(lattice) xyplot(1~1, ylab = expression(atop(phantom(0)^14*C*-glyphosate line, line2))) On 8/4/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Use atop: plot(1, main = expression(atop( ^14*C*-glyphosate line,

Re: [R] meta characters in file path

2006-08-04 Thread Li,Qinghong,ST.LOUIS,Molecular Biology
Thanks. I tried them, it works for most of those characters except * and ?. Does regular expression work in file names in windows? e.g. I have a machine-generated file named 021706 matrix#1479 @50.csv, of which 1479 is kinda random. Will I be able to match 1479 with some sort of wild card

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
Actually Gabor, using your solution with 'atop', which I had not considered, it will work with base graphics: par(oma = c(0, 0, 2, 0), mar = c(5, 6, 0.25, 2), lheight = 1) plot(1:10, ylab = expression(atop( ^14*C*-glyphosate line1, line2))) HTH, Marc On

[R] Simulate an Overdispersed(extra-variance poisson process)?

2006-08-04 Thread Spencer Jones
Is there a function in R comparable to rpois that can simulate random variables from an overdispersed poisson distribution? If there is not a function any ideas/references on how to program one? thanks, Spencer Jones Graduate Student, NLM Fellow Dept. Biomedical Informatics University of Utah

Re: [R] Simulate an Overdispersed(extra-variance poisson process)?

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 10:33 -0600, Spencer Jones wrote: Is there a function in R comparable to rpois that can simulate random variables from an overdispersed poisson distribution? If there is not a function any ideas/references on how to program one? Take a look at ?rnbinom or

[R] Error when loading odesolve

2006-08-04 Thread Wuming Gong
Dear list, I installed odesolve package (0.5-15) in R 2.3.1 in a Solaris server (Generic_118558-11 sun4u sparc SUNW,Sun-Blade-1000). The installing progress completed without errors, though several warnings like Warning: Option -fPIC passed to ld, if ld is invoked, ignored otherwise were

Re: [R] Sampling from a Matrix

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)), dim = c(5,5), dimnames = list(1:5, letters[1:5])) probs a b c d

[R] GAM 2D-plotting

2006-08-04 Thread Nixon Bahamon
Hi, When I fit a GAM model (using mgvc) with overlapping terms, such as gam(y~s(x,z)+s(z,w)) and afterwards I pretend to plot the component smooth functions that make it up using plot.gam, I achieve a couple of 2D plots. My question is: What's the meaning of those 2D plots in terms of y?

[R] training svm's with probability flag

2006-08-04 Thread Jessie Tenenbaum
Hi- I'm seeing some weirdness with svm and tune.svm that I can't figure out- was wondering if anyone else has seen this? Perhaps I'm failing to make something the expected class? Below is my repro case, though it *sometimes* doesn't repro. I'm using R2.3.1 on WindowsXP. I was also seeing it happen

[R] why does lm() not allow for negative weights?

2006-08-04 Thread Jens Hainmueller
Dear List, Why do commonly used estimator functions (such as lm(), glm(), etc.) not allow negative case weights? I suspect that there is a good reason for this. Yet, I can see reasonable cases when one wants to use negative case weights. Take lm() for example: ### n - 20 Y - rnorm(n) X -

Re: [R] meta characters in file path

2006-08-04 Thread Prof Brian Ripley
On Fri, 4 Aug 2006, Li,Qinghong,ST.LOUIS,Molecular Biology wrote: Thanks. I tried them, it works for most of those characters except * and ?. Those are not valid characters in Windows file paths (/ * : ? \ | are invalid in file or dir names). Does regular expression work in file names

Re: [R] Error when loading odesolve

2006-08-04 Thread Prof Brian Ripley
Looking at odesolve, src/Makevars is PKG_LIBS=$(BLAS_LIBS) Now, the documentation says that if you have $(BLAS_LIBS) you must also have $(FLIBS), so please change this to PKG_LIBS=$(BLAS_LIBS) $(FLIBS) and take this up with the package maintainer (which is what the posting guide asked you to

Re: [R] why does lm() not allow for negative weights?

2006-08-04 Thread Duncan Murdoch
On 8/4/2006 1:26 PM, Jens Hainmueller wrote: Dear List, Why do commonly used estimator functions (such as lm(), glm(), etc.) not allow negative case weights? Residual sums of squares (or deviances) could be negative with negative case weights. This doesn't seem like a good thing: would

Re: [R] why does lm() not allow for negative weights?

2006-08-04 Thread Jens Hainmueller
Thanks Duncan Murdoch, Why do commonly used estimator functions (such as lm(), glm(), etc.) not allow negative case weights? Residual sums of squares (or deviances) could be negative with negative case weights. This doesn't seem like a good thing: would you really want the fit to

Re: [R] why does lm() not allow for negative weights?

2006-08-04 Thread Dirk Eddelbuettel
On 4 August 2006 at 19:26, Jens Hainmueller wrote: | Why do commonly used estimator functions (such as lm(), glm(), etc.) not | allow negative case weights? I suspect that there is a good reason for this. That came up on r-sig-finance a little while ago. As usual, Gabor won the contest for most

Re: [R] prettyR arrives

2006-08-04 Thread Rick Bilonick
On Fri, 2006-08-04 at 19:37 -0400, Jim Lemon wrote: Hi all, I have finally gotten the prettyR package going (many thanks to Kurt Hornik for his patience). prettyR is a set of functions that allows the user to produce HTML output from R scripts. Given an R script that runs properly, an

Re: [R] ggplot facet label font size

2006-08-04 Thread Gabor Grothendieck
With ggplot its possible to do this too but in that case it seems necessary to recurse through the grobs. Here we look for grobs that have a label component which contains a colon and grid.edit those changing the value of cex. Note that getNames() give a single grob named pretty and we start

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Prof Brian Ripley
On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines.

Re: [R] Questions about sweave... question answered and problem solved

2006-08-04 Thread Brian Lunergan
* Dieter Menne wrote, On 2006-08-04 02:57: Brian Lunergan ff809 at ncf.ca writes: Evening all: I'm taking a little time to experiment with R, Sweave, and Miktex/LaTex but I've run up against some problems and -well- I hope that there are some on the list who might have some suggestions.

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 19:44 +0100, Prof Brian Ripley wrote: On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long

[R] training svm's with probability flag (re-send in plain text)

2006-08-04 Thread Jessie Tenenbaum
Hi- I'm seeing some weirdness with svm and tune.svm that I can't figure out- was wondering if anyone else has seen this? Perhaps I'm failing to make something the expected class? Below is my repro case, though it *sometimes* doesn't repro. I'm using R2.3.1 on WindowsXP. I was also seeing it

[R] Doubt about Student t distribution simulation

2006-08-04 Thread Jose Claudio Faria
Dear R list, I would like to illustrate the origin of the Student t distribution using R. So, if (sample.mean - pop.mean) / standard.error(sample.mean) has t distribution with (sample.size - 1) degree free, what is wrong with the simulation below? I think that the theoretical curve should

Re: [R] meta characters in file path

2006-08-04 Thread Li,Qinghong,ST.LOUIS,Molecular Biology
thanks Prof Ripley. dir() returns the path with full names (wildcards replaced) that are exactly what I need. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Prof Brian Ripley Sent: Friday, August 04, 2006 12:27 PM To: Li,Qinghong,ST.LOUIS,Molecular

Re: [R] Doubt about Student t distribution simulation

2006-08-04 Thread John Fox
Dear Jose, The problem is that you're using the population standard deviation (sigma) rather than the sample SD of each sample [i.e., t[i] = (mean(amo.i) - mu) / (sd(amo.i) / sqrt(n)) ], so your values should be normally distributed, as they appear to be. A couple of smaller points: (1) Even

Re: [R] Doubt about Student t distribution simulation

2006-08-04 Thread Peter Dalgaard
Jose Claudio Faria [EMAIL PROTECTED] writes: Dear R list, I would like to illustrate the origin of the Student t distribution using R. So, if (sample.mean - pop.mean) / standard.error(sample.mean) has t distribution with (sample.size - 1) degree free, what is wrong with the simulation

Re: [R] Error when loading odesolve

2006-08-04 Thread Setzer . Woodrow
Prof. Ripley: Thanks for diagnosing Wuming Gong's problem. I'm not sure I would have recognized the solution so quickly. I have uploaded to CRAN a new version of odesolve with Makevars fixed. R. Woodrow Setzer, Ph. D. National Center for Computational Toxicology US Environmental Protection

Re: [R] Doubt about Student t distribution simulation

2006-08-04 Thread Sundar Dorai-Raj
Hi, Jose/John, Here's an example to help Jose and highlights John's advice. Also includes set.seed which should be included in all simulations posted to R-help. set.seed(42) mu - 10 sigma - 5 n - 3 nsim - 1 m - matrix(rnorm(n * nsim, mu, sigma), nsim, n) t - apply(m, 1, function(x)

Re: [R] Doubt about Student t distribution simulation

2006-08-04 Thread Jose Claudio Faria
Dears John, Peter and Sundar, Many thanks for the quick answers!!! .. and sorry for all.. []s ___ Jose Claudio Faria Brasil/Bahia/Ilheus/UESC/DCET Estatística Experimental/Prof. Adjunto mails: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] John Fox escreveu: Dear Jose,

Re: [R] Doubt about Student t distribution simulation

2006-08-04 Thread John Fox
Dear Sundar, Try qq.plot(t, dist=t, df=n-1) from the car package, which include a 95-percent point-wise confidence envelope that helps you judge how extreme the outliers are relative to expectations. Regards, John John Fox Department of Sociology McMaster

[R] Help with short time series

2006-08-04 Thread Simone Vincenzi
Dear R-list, I have a statistical problem with the comparison of two short time-series of density data in an ecological framework. I have to compare two short time series (5 years, one value for each year) of species density data (it is the density of fish in two different streams) to test if

[R] Postscript fonts

2006-08-04 Thread Erich Neuwirth
How can I find out what fonts are available for par(family= for the postscript device? -- Erich Neuwirth, Didactic Center for Computer Science University of Vienna Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-39464 Fax: +43-1-4277-9394

[R] Variance-Covariance matrix from glm()

2006-08-04 Thread Daniel Jeske
We are trying to find out how to get the variance-covariance matrix of the MLEs out of the glm function. Can anyone help? Thanks, Daniel Jeske Department of Statistics University of California Riverside, CA [[alternative HTML version deleted]]

[R] polychoric correlation error

2006-08-04 Thread Rosenbaum, Janet
Dear all, I get a strange error when I find polychoric correlations with the ML method, which I have been able to reproduce using randomly-generated data. What is wrong? I realize that the data that I generated randomly is a bit strange, but it is the only way that I duplicate the error

Re: [R] Variance-Covariance matrix from glm()

2006-08-04 Thread Achim Zeileis
On Fri, 4 Aug 2006, Daniel Jeske wrote: We are trying to find out how to get the variance-covariance matrix of the MLEs out of the glm function. Can anyone help? It can be extracted with the corresponding vcov() method. Best, Z __

[R] (... not defined because of singularities) in lm()

2006-08-04 Thread Jia Pu
I got the message, Coefficients: (1 not defined because of singularities), in the returned result of lm(). What does it mean? And where should I start investigating why it happens? thanks. /// Complete result of lm() Call: lm(formula = durationRatio ~ isHStar + isWordFinal + oneSyllToEOW +

[R] cor of two matrices whose columns got shuffled

2006-08-04 Thread Betty Gilbert
Hello, I'm trying to take the correlation of two distance matrices and get the r2 value ex) Ndisc PS1Ntet Nsito NcB NcA PS3 NcC NiB NiA PS1 0.08945 Ntet 0.08601 0.02020

Re: [R] polychoric correlation error

2006-08-04 Thread John Fox
Dear Janet, Because you didn't set the value of the random-number generator seed, your example isn't precisely reproducible, but the problem is apparent anyway: set.seed(12345) n-100 test.x-rnorm(n, mean=0, sd=1) test.c-test.x + rnorm(n, mean=0, sd=.5) thresh.x-c(-2.5, -1, -.5, .5, 1000)