Re: [R] Error message handling

2004-06-24 Thread Prof Brian Ripley
On Wed, 23 Jun 2004 [EMAIL PROTECTED] wrote: Dear, R experts. Does anybody have experience with 'optim' function? Yes. I have an error message as the following. Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method = BFGS, : initial value in vmmin is not finite I

[R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Sixten Borg
Hello all, I upgraded from R 1.8.1 to 1.9.0 (Windows XP), and spotted an odd thing. The last three letters in the Swedish alphabet are å, ä and ö. (In case they don't show correctly: they are a with a ring, a with two dots, and o with two dots (HTML: aring; auml; ouml;). When I use these as

RE: [R] Tick marks in xyplot

2004-06-24 Thread Ingolfsson, Olafur
Thank you for the tips, it is also good to know that the packages are getting even better. I however solved it this way: lset(col.whitebg()) x.data - rnorm(16,20,7);y.data - rnorm(16,.55,.25); z.data - sample(1:4,16,replace=T) xyplot(y.data~x.data|z.data,

Re: [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Prof Brian Ripley
This is a function of the OS set by your locale, and there is nothing we can do about it. It is done by the C call isalpha in do_makenames in src/main/character.c. My Windows XP machine in Swedish does accept all three, using the CRAN-compiled version of rw1091.exe, so something is up with

Re: [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Peter Dalgaard
Sixten Borg [EMAIL PROTECTED] writes: Hello all, I upgraded from R 1.8.1 to 1.9.0 (Windows XP), and spotted an odd thing. The last three letters in the Swedish alphabet are å, ä and ö. (In case they don't show correctly: they are a with a ring, a with two dots, and o with two dots (HTML:

RE: [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Ingolfsson, Olafur
Sixten Borg [EMAIL PROTECTED] writes: When I use these as variable names in a data.frame, odd things happen: data.frame(a=1, å=2, ä=3, ö=4) a å ä X. 1 1 2 3 4 I your variables only include numbers (or only characters), this works XX - cbind(a=1, å=2, ä=3, ö=4, æ=5, ø=6) XX a å

Re: [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Uwe Ligges
Ingolfsson, Olafur wrote: Sixten Borg [EMAIL PROTECTED] writes: When I use these as variable names in a data.frame, odd things happen: data.frame(a=1, å=2, ä=3, ö=4) a å ä X. 1 1 2 3 4 I your variables only include numbers (or only characters), this works XX - cbind(a=1, å=2, ä=3, ö=4,

RE: [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Prof Brian Ripley
On Thu, 24 Jun 2004, Ingolfsson, Olafur wrote: Sixten Borg [EMAIL PROTECTED] writes: When I use these as variable names in a data.frame, odd things happen: data.frame(a=1, å=2, ä=3, ö=4) a å ä X. 1 1 2 3 4 I your variables only include numbers (or only characters), this works

Summary [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Sixten Borg
Summary: The locale setting in the operating system seems to be involved in what confused me a little bit. Thank you all for your help, especially the suggested work-around data.frame(..., check.names=F) which works very well. A mystery still to be solved is why two versions of R, running on

Re: [R] Can R handle twin peaks - normal distribution

2004-06-24 Thread Martin Maechler
Unung == Unung Istopo Hartanto [EMAIL PROTECTED] on Thu, 24 Jun 2004 10:49:29 +0700 writes: Unung Hi R Users, Sorry if its out of topic. I would like Unung to ask you about twin peaks - normal Unung distribution. How R can handle it, any example to Unung explain it in R.

[R] More problems with lattice and postscript

2004-06-24 Thread Virgilio Gómez Rubio
Dear List members, I am trying to produce some trellis graphics and to save them in a postscript file but I only get blank files. R behaviour is certainly strange because I use a loop to generate the graphics (see code below). When I change the loop variable myself the postscript graphics are

Re: [R] More problems with lattice and postscript

2004-06-24 Thread Prof Brian Ripley
On Thu, 24 Jun 2004, Virgilio Gómez Rubio wrote: I am trying to produce some trellis graphics and to save them in a postscript file but I only get blank files. R behaviour is certainly strange because I use a loop to generate the graphics (see code below). When I change the loop variable

Re: Summary [R] R 1.9.0, special characters in variable names.

2004-06-24 Thread Murray Jorgensen
This is not what I would call a summary. A summary should: 1. State the original question. 2. Give a pre'cis of the responses. Murray Jorgensen Sixten Borg wrote: Summary: The locale setting in the operating system seems to be involved in what confused me a little bit. Thank you all for

[R] Set-up files corrupted error message

2004-06-24 Thread Fiona Sanderson
I've tried to download rw1090.exe 3 times and rw1081.exe once onto a Windows XP from the UK mirrors (I've tried both of them). When the download is complete and I double-click on the icon I get an error message telling me the set-up files are corrupted and to obtain a new copy of the program. I

Re: [R] Set-up files corrupted error message

2004-06-24 Thread Uwe Ligges
Fiona Sanderson wrote: I've tried to download rw1090.exe 3 times and rw1081.exe once onto a Windows XP from the UK mirrors (I've tried both of them). When the download is complete and I double-click on the icon I get an error message telling me the set-up files are corrupted and to obtain a new

[R] Catching R's (D)COM output in perl

2004-06-24 Thread Stefan Etschberger
Hi, i'm using Perl to control R under Windows via the Win32::OLE module and R's (D)COM server. This works fine, if i send commands and/or simple data structures to R. I am also able to get matrix-shaped return values into my Perl program, like this # snip

[R] Bug in parse; memory access test forgotten ?

2004-06-24 Thread Jean Coursol
I was exploring the polynom library with students: library(polynom) x - polynomial() z - (1+x)^100 f - as.function(z) # = Segmentation fault (with R-1.8.1 and R-1.9.0) !!! Debugging at hand: as.function.polynomial - function (x, ...) { p - x horner - function(p) { a -

Re: [R] assigning from multiple return values

2004-06-24 Thread Gabor Grothendieck
Here is a minor update with support for empty arguments. They are just thrown away eliminating the need to use a dummy name for them. list - structure(NA,class=result) [-.result - function(x,...,value) { args - as.list(match.call()) args - args[-c(1:2,length(args))] length(value) -

[R] tree model with at most one split point per variable

2004-06-24 Thread Gabor Grothendieck
I would like to create a tree model with at most one split point per variable using tree, rpart or other routine. Its OK if a variable enters at more than one node but if it does then all splits for that variable should be at the same point. The idea is that I want to be able to summarize the

Re: [R] Can R handle twin peaks - normal distribution

2004-06-24 Thread Spencer Graves
Have you made normal probability plots? Mixtures of a small number of normal distributions will appear as a collection of straight line segments with breakpoints related to the mixing percentages, slopes of the lines proportional to the standard deviations, etc. I don't understand the

Re: [R] nlme questions (e.g., specifying group membership, changing options)

2004-06-24 Thread Spencer Graves
Are your categorical variables factors or ordered factors? If yes, lm and many other functions including, I believe, nlme, will automatically create the required dummy variables using contrasts specified by options()$contrasts. Consider the following: options(contrasts) $contrasts

Re: [R] Set-up files corrupted error message

2004-06-24 Thread Duncan Murdoch
On Thu, 24 Jun 2004 13:01:59 +0100 (BST), Fiona Sanderson [EMAIL PROTECTED] wrote : I've tried to download rw1090.exe 3 times and rw1081.exe once onto a Windows XP from the UK mirrors (I've tried both of them). When the download is complete and I double-click on the icon I get an error message

[R] Xgobi graphs

2004-06-24 Thread Hector L. Ayala-del-Rio
I have generated a 3D graph from data in R using the Xgobi package. Does anybody know how to generate a postscript file of the Xgobi graph?? I have searched everywhere and I can not find it. Thanks in advance Hector Héctor L. Ayala-del-Río, Ph.D. Center for Microbial Ecology Center for

Re: [R] Re: summaries (was: SUMMARY: elementary sapply question)

2004-06-24 Thread Tony Plate
Posting summaries is customary (or used to be) on S-news, where it was customary to reply to the poster, and not always the whole list. (Whereas on R it is requested that replies be posted to the entire list, which makes summaries less necessary.) However, a good summary can be a very useful

Re: [R] Xgobi graphs

2004-06-24 Thread Christian Hennig
XGobi menu - file - print Christian On Thu, 24 Jun 2004, Hector L. Ayala-del-Rio wrote: I have generated a 3D graph from data in R using the Xgobi package. Does anybody know how to generate a postscript file of the Xgobi graph?? I have searched everywhere and I can not find it. Thanks

[R] Rotate a plot generated by wireframe

2004-06-24 Thread Garavito,F (pgr)
Is there any way to rotate a plot generated by the wireframe function (lattice)? Thank you, Fabian Garavito __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Rotate a plot generated by wireframe

2004-06-24 Thread Spencer Graves
Have you considered the screen argument to wireframe, as described in the documentation, including one of the examples? hope this helps. spencer graves Garavito,F (pgr) wrote: Is there any way to rotate a plot generated by the wireframe function (lattice)? Thank you, Fabian

Re: [R] Rotate a plot generated by wireframe

2004-06-24 Thread roger koenker
For this sort of thing the package rgl is the way to go... url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of Illinois fax:217-244-6678

Re: [R] More problems with lattice and postscript

2004-06-24 Thread Karl Knoblick
Try print(bwplot(...YOUR PARAMETERS...)) Best wishes, Karl Dear List members, I am trying to produce some trellis graphics and to save them in a postscript file but I only get blank files. R behaviour is certainly strange because I use a loop to generate the graphics (see code

[R] R and neighbor joining algorithm

2004-06-24 Thread Michel Baylac
Does anybody knows about a R implementation of the neighbor joining algorithm ? I made a Google search without success. Perhaps somebody already cooked something ? Thanks in advance Michel Baylac Muséum National d'Histoire Naturelle Systematic and Evolution Dpt CNRS UMR 2695

[R] system shell emulation in R

2004-06-24 Thread Shin, Daehyok
Rather than using system() to execute a shell command, is there a way to emulate the system shell itself in R? For instance, if the function is shell, getwd() [1] /home/a/b shell() # From R to system shell $cd .. # cd command in system shell $CTRL+D# Return to R

[R] Problem with predict arima

2004-06-24 Thread Laura Quinn
I have fitted an arima(0,0,2) model to my data, and am trying to plot a forecast for the next 15 time steps, but each time i try I am given the following error message: Error in .cbind.ts(list(...), makeNames(...), dframe = dframe, union = TRUE) : non-time series not of the correct length

Re: [R] system shell emulation in R

2004-06-24 Thread Prof Brian Ripley
On Thu, 24 Jun 2004, Shin, Daehyok wrote: Rather than using system() to execute a shell command, is there a way to emulate the system shell itself in R? For instance, if the function is shell, getwd() [1] /home/a/b shell() # From R to system shell $cd .. # cd

[R] [SOLVED] GET_DIM() crash on Windows only

2004-06-24 Thread Paul Roebuck
Paul Roebuck wrote: I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the Send Bug Report dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwise appear properly

RE: [R] system shell emulation in R

2004-06-24 Thread Shin, Daehyok
Is it difficult in R to create a function calling system() with user's inputs iteratively? Daehyok Shin (Peter) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Prof Brian Ripley Sent: Thursday, June 24, 2004 PM 2:28 To: Shin, Daehyok Cc: R, Help

[R] The median function in R does not work properly.

2004-06-24 Thread Alexi Zubiria
Hi, 1.) The median function does not work well. Please refer to the data below (same data is attached as txt-delimited). This is what I try to do in R: median ( dataf [2:9] ) I get warning: needs numeric data 2.) BUT if apply the median to a single vector: median ( dataf

[R] Bayesian Meta Regression model question

2004-06-24 Thread m i
Hi: Is there a command in R (similar to hblm I guess) that would allow me to fit a clustered version of the hierarchichal bayes model, Y_ij = X_ij\beta + \delta_i + \epsilon_ij the \epsilon_ij have known variances, \delta_i ~ N(0,\tau^2) etc.. Thanks!

Re: [R] The median function in R does not work properly.

2004-06-24 Thread Duncan Murdoch
On Thu, 24 Jun 2004 13:23:22 -0700, Alexi Zubiria [EMAIL PROTECTED] wrote : Hi, 1.) The median function does not work well. It works fine for me. You were trying to take the median of a list. It only knows how to take the median of a vector. Use dataf [,2:9] not dataf [2:9] to get a

Re: [R] The median function in R does not work properly.

2004-06-24 Thread Duncan Murdoch
Oops, missed something below: On Thu, 24 Jun 2004 13:23:22 -0700, Alexi Zubiria [EMAIL PROTECTED] wrote : Hi, 1.) The median function does not work well. It works fine for me. You were trying to take the median of a list. It only knows how to take the median of a vector of numbers. Use

Re: [R] Bayesian Meta Regression model question

2004-06-24 Thread Spencer Graves
Have you considered lme? hope this helps. spencer graves m i wrote: Hi: Is there a command in R (similar to hblm I guess) that would allow me to fit a clustered version of the hierarchichal bayes model, Y_ij = X_ij\beta + \delta_i + \epsilon_ij the \epsilon_ij have known variances,

Re: [R] The median function in R does not work properly.

2004-06-24 Thread Sundar Dorai-Raj
Alexi Zubiria wrote: Hi, 1.) The median function does not work well. Please refer to the data below (same data is attached as txt-delimited). This is what I try to do in R: median ( dataf [2:9] ) I get warning: needs numeric data 2.) BUT if apply the median to a single vector:

[R] problem with arima

2004-06-24 Thread Erin Hodgess
Hi Laura! in your last line, you have myforecast$pred instead of my.forecast$pred Hope this helps! If that's not it, try str(my.list) str(my.forecast$pred) and check to see that they are both time series Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical

[R] Proportions - basic question

2004-06-24 Thread Peyuco Porras Porras .
Hi, How can I get descriptive statitics (mean, se, etc) for a variable expressed in percentage? (like summary() for a continous var) Can I tell R to do that? Thank you PP __ [EMAIL PROTECTED] mailing list

RE: [R] system shell emulation in R

2004-06-24 Thread Prof Brian Ripley
On Thu, 24 Jun 2004, Shin, Daehyok wrote: Is it difficult in R to create a function calling system() with user's inputs iteratively? See the example below! Daehyok Shin (Peter) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Prof Brian Ripley

Re: [R] Proportions - basic question

2004-06-24 Thread Rolf Turner
You wrote: How can I get descriptive statitics (mean, se, etc) for a variable expressed in percentage? (like summary() for a continous var) Can I tell R to do that? Percentages (and proportions) ***are*** continuous variates. cheers,

[R] problem with model.matrix

2004-06-24 Thread Trevor Hastie
This works: model.matrix(~I(pos3),data=data.frame(pos=c(1:5))) (Intercept) I(pos 3)TRUE 1 1 0 2 1 0 3 1 0 4 1 1 5 1 1 attr(,assign) [1] 0 1 attr(,contrasts)

[R] help in importing data

2004-06-24 Thread Jose Sanchez
hi, i was wondering if you can give me an example on how to import a data set in csv format. i tried the manual's example, but have been getting an error message:Error: syntax error. sincerely, jose sanchez __ [EMAIL PROTECTED] mailing list

Re: [R] help in importing data

2004-06-24 Thread Ko-Kang Kevin Wang
Hi, Try read.csv() i.e. take a look at ?read.csv HTH Kevin - Original Message - From: Jose Sanchez [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Sent: Friday, June 25, 2004 10:38 AM Subject: [R] help in importing data hi, i was wondering if you can give me an

Re: [R] problem with model.matrix

2004-06-24 Thread Peter Dalgaard
Trevor Hastie [EMAIL PROTECTED] writes: This does not: model.matrix(~I(pos3),data=data.frame(pos=c(1:2))) Error in contrasts-(`*tmp*`, value = contr.treatment) : contrasts can be applied only to factors with 2 or more levels Oh yes it does:

RE: [R] problem with model.matrix

2004-06-24 Thread Liaw, Andy
From: Peter Dalgaard Trevor Hastie [EMAIL PROTECTED] writes: This does not: model.matrix(~I(pos3),data=data.frame(pos=c(1:2))) Error in contrasts-(`*tmp*`, value = contr.treatment) : contrasts can be applied only to factors with 2 or more levels Oh yes it does: Ditto here.

Re: [R] problem with model.matrix

2004-06-24 Thread Balasubramanian Narasimhan
Trevor's problem is reproducible on R 1.8.1 (which is what he was using) on both Linux RHEL 3.0 and Solaris and R 1.8.0 on Windows. - Original Message - From: Trevor Hastie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 24, 2004 3:12 PM Subject: [R] problem with

Re: [R] problem with model.matrix

2004-06-24 Thread Berwin A Turlach
BN == Balasubramanian Narasimhan [EMAIL PROTECTED] writes: BN Trevor's problem is reproducible on R 1.8.1 (which is what he BN was using) on both Linux RHEL 3.0 and Solaris and R 1.8.0 on BN Windows. Yep, on my Linux box (details below) I have the same problem with R 1.8.1 but no

[R] Unique.data.frame...still getting duplicates

2004-06-24 Thread F Z
Hi there I have a data frame with about 65,000 rows and 8 variables. I am trying to get rid of the double entries of a factor variable ID so I can get a unique observation for each ID I tried: dupl_unique.data.frame(data[ID,]) #I obtain a data frame with 21,547 observations..so far so good,

RE: [R] Unique.data.frame...still getting duplicates

2004-06-24 Thread Liaw, Andy
From: F Z Hi there I have a data frame with about 65,000 rows and 8 variables. I am trying to get rid of the double entries of a factor variable ID so I can get a unique observation for each ID I tried: dupl_unique.data.frame(data[ID,]) #I obtain a data frame with 21,547

Re: [R] Unique.data.frame...still getting duplicates

2004-06-24 Thread Alec Stephenson
data[!duplicated(data$ID),] will do. Your unique(data[ID,]) removes duplicated rows in data[ID,], assuming the object ID exists. Alec Stephenson Department of Statistics Macquarie University NSW 2109, Australia F Z [EMAIL PROTECTED] 06/25/04