RE: [R] cgi/servlets/httpd in R

2004-05-10 Thread Samuelson, Frank*
Actually, what I have is probably not what you want, and I wrote it as an example of what I was looking for, and what is probably possible. My code is just a hack of the snow socket code. To answer your questions: 1. The communication is done by serializing R objects. That is, the process

[R] question about possibility with R - Tcl/tk library

2004-05-10 Thread Julien Glenat
Hi , i am using the R(1.8.1) tcl/tk library in order to build a graphical user interface to mathematic function and i would like to know if it is possible to retrieve the value of a tkentry to make a R vector for exemple with an entry containing 1,2,3,4,5 i want to make a vector which

[R] Model names - model-based clustering

2004-05-10 Thread Talita Leite
Hello! Please, somebody could explain me what exactly means that model names? For example ”VVV”: ellipsoidal, varying volume, shape, and orientation. Thanks. Talita Perciano Costa Leite Graduanda em Ciência da Computação Universidade Federal de Alagoas - UFAL Departamento de Tecnologia da

Re: [R] strange behavior of names-

2004-05-10 Thread Thomas Lumley
On Sun, 9 May 2004, Liaw, Andy wrote: Dear R-help, I've encounter what seems to me a strange problem with names-. Suppose I define the function: fun - function(x, f) { m - tapply(x, f, mean) ans - x - m[match(f, unique(f))] names(ans) - names(x) ans } which subtract

Re: [R] Getting the groupmean for each person

2004-05-10 Thread Thomas Lumley
On Mon, 10 May 2004, Christophe Pallier wrote: The use of tapply(x,f,mean)[match(f,unique(f))] assumes a particular order in the result of tapply, no? It seems a bit dangerous to me. My original code for the group means problem used rowsum(,reorder=FALSE) rather than tapply(), and we do know

Re: [R] question about possibility with R - Tcl/tk library

2004-05-10 Thread Peter Dalgaard
Julien Glenat [EMAIL PROTECTED] writes: Hi , i am using the R(1.8.1) tcl/tk library in order to build a graphical user interface to mathematic function and i would like to know if it is possible to retrieve the value of a tkentry to make a R vector for exemple with an entry containing

[R] Solve for Please set TMPDIR to a valid temporary directory

2004-05-10 Thread aedin culhane
Dear R Help, My apologies if this is widely known, but I didn't find this in the R archives. I am running WinXP pro and R 1.90. Rcmd build or check fails with the error: Please set TMPDIR to a valid temporary directory $TMPDIR is set to $TMPDIR or C:/TEMP in share\perl\R\Var.pm. TMPDIR or

Re: [R] Solve for Please set TMPDIR to a valid temporary directory

2004-05-10 Thread Uwe Ligges
aedin culhane wrote: Dear R Help, My apologies if this is widely known, but I didn't find this in the R archives. I am running WinXP pro and R 1.90. Rcmd build or check fails with the error: Please set TMPDIR to a valid temporary directory OK. So why do you not set an environment variable

[R] function me

2004-05-10 Thread Talita Leite
Hi! Talking about the function me. One of the result values of this funtion is the loglik. I want to understand better what is this. Sombody could help me? Talita Perciano Costa Leite Graduanda em Ciência da Computação Universidade Federal de Alagoas - UFAL Departamento de Tecnologia da

[R] Lists and outer() like functionality?

2004-05-10 Thread David Orme
Hi, I'm have a list of integer vectors and I want to perform an outer() like operation on the list. As an example, take the following list: mylist - list(1:5,3:9,8:12) A simple example of the kind of thing I want to do is to find the sum of the shared numbers between each vector to give a

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread Peter Dalgaard
David Orme [EMAIL PROTECTED] writes: Hi, I'm have a list of integer vectors and I want to perform an outer() like operation on the list. As an example, take the following list: mylist - list(1:5,3:9,8:12) A simple example of the kind of thing I want to do is to find the sum of the

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread Jason Turner
David Orme [EMAIL PROTECTED] wrote: ... I'm have a list of integer vectors and I want to perform an outer() like operation on the list. As an example, take the following list: mylist - list(1:5,3:9,8:12) A simple example of the kind of thing I want to do is to find the sum of the shared

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread David Orme
On 10 May 2004, at 15:45, Jason Turner wrote: I'm having a hard time figuring out what you want. Who is this mystery object test? Ah - sorry all. That should be: for(x in ind){ for(y in ind){ result[x,y] - sum(mylist[[x]][mylist[[x]] %in% mylist[[y]]]) } } As a style point, ind -

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread Peter Dalgaard
David Orme [EMAIL PROTECTED] writes: Following up on Peter Dalgaard's suggestion, I've tried vectorizing the function properly. Now I get the same answers from both the two for() loops and the vectorized outer() call. What puzzles me slightly is that using outer is about 13 times slower. I

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread David Orme
outer() generally works by expanding out the lists like Y - rep(y,length(x)) X - rep(x,each=length(y)) # or maybe it's vice versa, never mind... FUN(X,Y,extras) and then adds dims and dimnames. If FUN vectorizes, this is the efficient way, but it does not in your case and the rep()s are probably

[R] #!/usr/bin/R

2004-05-10 Thread Webb Sprague
Hi all, Is there any documentation on running R like one would run a shell or Perl script, with out/input directed appropriately, environment variable access, and command switch processing? I looked some, and even remembered to check the FAQ, but couldn't find anything. Thanks W

Re: [R] environmental data as vector in PCA plots

2004-05-10 Thread Jari Oksanen
On 10 May 2004, at 17:15, Heike Schmitt wrote: I want to include a vector representing the sites - environmental data correlation in a PCA. I currently use prcomp (no scaling) to perform the PCA, and envfit to retrieve the coordinates of the environmental data vector. However, the vector length

RE: [R] #!/usr/bin/R

2004-05-10 Thread Liaw, Andy
Someone had modified the R source to handle this, but it has not been incorporated into the official R source, if I'm not mistaken. Search the R-devel archive. HTH, Andy From: Webb Sprague Hi all, Is there any documentation on running R like one would run a shell or Perl script, with

[R] problem with loadURL -- claims newer version used

2004-05-10 Thread William Revelle
Dear list, I am trying to prepare a handout showing how to use R for factor analysis. As part of the exercise I want to save a correlation matrix on a tutorial web page. I can save with no problem (saving locally and then transferring to the web site). Although I can load() the local file,

Re: [R] #!/usr/bin/R

2004-05-10 Thread Peter Dalgaard
Liaw, Andy [EMAIL PROTECTED] writes: Someone had modified the R source to handle this, but it has not been incorporated into the official R source, if I'm not mistaken. Search the R-devel archive. You can do stuff like this though: cat test.R #!/bin/sh tail +3 $0 | R --vanilla --args $@ ;

Re: [R] problem with loadURL -- claims newer version used

2004-05-10 Thread Prof Brian Ripley
big5r.txt is delimited by CR not LF, and as R writes it as a binary file, that's not the file that got saved. Same problem with the header on big5r. Try some octal dumps and find out which step is changing the file. BTW, I would use load(url(someURL)) these days. On Mon, 10 May 2004,

Re: [R] R 1.9.0 on AIX, 64-bit

2004-05-10 Thread Tim Hoar
So -- I am getting the same thing - as far as the base-Ex.Rout.fail -- did undefining HAVE_WORKING STRPTIME fix the problem? Despite using the suggestions on page 21 of the install guide, I cannot seem to find the set of options necessary for dynamic linking. I am loading with xlc, MAIN_LDFLAGS

Re: [R] Colouring hclust() trees

2004-05-10 Thread Thomas Petzoldt
Richard A. O'Keefe wrote: I have a data set with 6 variables and 251 cases. The people who supplied me with this data set believe that it falls naturally into three groups, and have given me a rule for determining group number from these 6 variables. One possibility is to extract the coordinates

Re: [R] Lists and outer() like functionality?

2004-05-10 Thread Gabor Grothendieck
David Orme d.orme at imperial.ac.uk writes: : : : outer() generally works by expanding out the lists like : : Y - rep(y,length(x)) : X - rep(x,each=length(y)) # or maybe it's vice versa, never mind... : FUN(X,Y,extras) : : and then adds dims and dimnames. If FUN vectorizes, this is the :

Re: [R] Using known errors and error bars

2004-05-10 Thread Sebastian Schubert
What do you actually know? You don't have `known errors', as if you did you could correct the values. I doubt if you actually have a known range, more likely a standard error or a confidence interval. (If you think you do have a known range, how do you know?) Firstly, I must

[R] RODBC in RAqua

2004-05-10 Thread Anthony Darrouzet-Nardi
I've been trying to get RODBC working in RAqua. For my database, let's call it mydb, when I enter odbcConnect(mydb) or odbcConnect(mydb, uid=postgres, pwd=secret), RAqua thinks for about 10 seconds, then crashes. mydb is a PostgreSQL 7.4.2 database running on my machine (Mac OS X 10.3.3). I am

[R] Coordinate projection with proj4R: the Albers Equal-Area Conic projection?

2004-05-10 Thread Slist
Hi all! I am trying to project coordinates collected by GPS collars. The data is in decimal degrees and provides locations for two Sable antelope running around in Kruger NP South Africa. After a wide search it seems that proj4R provides most options for projection of coordinates. However I

Re: [R] RODBC in RAqua

2004-05-10 Thread Prof Brian Ripley
Does any other driver work? See the comments in the RODBC README. In particular, does a 7.2.5 driver really work with 7.4.2, and do you have a functioning driver -- the bundled one used to do exactly this. On Mon, 10 May 2004, Anthony Darrouzet-Nardi wrote: I've been trying to get RODBC

RE: [R] #!/usr/bin/R

2004-05-10 Thread Don MacQueen
That someone might have been me; I did at one time figure out how to execute scripts based on a first line like that of the subject line of this thread. As I recall, what I did was 1) before attempting to execute a script having such a first line, define the env vars that R.bin needs 2)

Re: [R] Coordinate projection with proj4R: the Albers Equal-AreaConicprojection?

2004-05-10 Thread Roger Bivand
This concerns a draft package not on CRAN, perhaps better discussed off list for now. Could you please attach a few example points for me to look at, and details of your R version and the proj4 library version you are using? What happens when you run proj from the command line? Roger Bivand

Re: [R] #!/usr/bin/R

2004-05-10 Thread wwsprague
Hi Associated with that attempt was a modification of the sources that I made, commenting out two lines in system.c, specifically: See file ./source/src/unix/system.c line 239 in R-1.8.1 patched as of 12/3/03 snprintf(msg, 1024, ARGUMENT '%s' __ignored__\n, *av);

Re: [R] #!/usr/bin/R

2004-05-10 Thread Roger D. Peng
You may be interested in this thread from R-devel last October: https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027862.html If I recall correctly, Duncan Temple Lang is working on different ways to initialize R but I'm not sure what the status of that is. -roger Webb Sprague

Re: [R] #!/usr/bin/R

2004-05-10 Thread Gabor Grothendieck
Webb Sprague wwsprague at ucdavis.edu writes: : Is there any documentation on running R like one would run a shell or : Perl script, with out/input directed appropriately, environment variable : access, and command switch processing? : : I looked some, and even remembered to check the FAQ, but

[R] Explaining Survival difference between Stata and R

2004-05-10 Thread Paul Johnson
Dear Everybody: I'm doing my usual how does that work in R thing with some Stata projects. I find a gross gap between the Stata and R in Cox PH models, and I hope you can give me some pointers about what goes wrong. I'm getting signals from R/Survival that the model just can't be estimated,

[R] lm with predictor matrix

2004-05-10 Thread Claus Gwiggner
Hello, can someone give me an example of how to fit a linear model where the response is a matrix, please? (other than a loop over lm calls) The ?lm points me to model.matrix but it is not clear to me how to use a model matrix in an lm call. fit-lm(headmatrix ~ tailmatrix) causes

RE: [R] lm with predictor matrix

2004-05-10 Thread Liaw, Andy
Try: x = matrix(runif(30), 10, 3) newx = matrix(runif(15), 5, 3) y = rnorm(10) fit = lm(y ~ x) newyhat = predict(fit, newdata=data.frame(x=I(newx))) HTH, Andy From: Claus Gwiggner Hello, can someone give me an example of how to fit a linear model where the response is a matrix,

Re: [R] lm with predictor matrix

2004-05-10 Thread Roger D. Peng
Your problem might be that the names of 'newframe' don't match the column names of 'tailmatrix'. It's hard to tell because you don't provide an example. Is 'newframe' a matrix or a dataframe? If it is a dataframe, try: names(newframe) - colnames(tailmatrix) predict(fit, newframe) -roger

[R] Re: Mozilla Misbehavior

2004-05-10 Thread arinbasu
Hi Murray: Perhaps the errors are thrown by Mozilla because it encounters an encrypted/secure page and does not know what to do (..:)..)? Would it help if you went to Edit Preferences... Privacy and Security select SSL or Certificates drop down list and then once in SSL, or once in

Re: [R] Colouring hclust() trees

2004-05-10 Thread Richard A. O'Keefe
I asked about putting some kind of coloured rug under a dendrogram. Thomas Petzoldt [EMAIL PROTECTED] replied: One possibility is to extract the coordinates used by the dendrogram using par(usr) ... Er, the documentation for par(usr) says 'usr' A vector of the form 'c(x1,

Re: [R] problem with loadURL -- claims newer version used- fixed

2004-05-10 Thread William Revelle
big5r.txt is delimited by CR not LF, and as R writes it as a binary file, that's not the file that got saved. Thanks. That was the problem. I was transferring the files from my Mac to my web server (also a Mac) using Interarchy. It was putting in CRs rather than LFs (the Interarchy options

Re: [R] Re: Mozilla Misbehavior

2004-05-10 Thread Murray Jorgensen
It was a proxy settings problem. All fixed now. Sorry to disturb the list. Murray Jorgensen [EMAIL PROTECTED] wrote: Hi Murray: Perhaps the errors are thrown by Mozilla because it encounters an encrypted/secure page and does not know what to do (..:)..)? Would it help if you went to Edit

[R] How to draw holes generated by gpclib using plot function

2004-05-10 Thread Hisaji ONO
Hi. (B (B I've tried to create a polygon with one hole by gpclib using following (Bexample script. (B (B holepoly - read.polyfile(system.file("poly-ex/hole-poly.txt", package (B="gpclib"), nohole = FALSE) (B area.poly(holepoly) (B plot(holepoly,poly.args=list(col="red",border="blue")) (B

Re: [R] strange behavior of names-

2004-05-10 Thread Prof Brian Ripley
Remember tapply with a single factor in R returns a 1D array. What you are seeing are the dimnames, not the names: look at attributes() on your return value (or even name() or str() on it). I suspect you intended an as.vector() call in the formation of m. Brian On Sun, 9 May 2004, Liaw, Andy

Re: [R] strange behavior of names-

2004-05-10 Thread Peter Dalgaard
Liaw, Andy [EMAIL PROTECTED] writes: [BTW, this is using the tip that Thomas Lumley posted about forming the group means. I've wanted to write a `tsweep' function that's sort of the cross of tapply() and sweep().] Also notice that this is unsplit(lapply(split(x, g), scale, scale=FALSE), g)

Re: [R] Getting the groupmean for each person

2004-05-10 Thread Christophe Pallier
Liaw, Andy wrote: Suppose I define the function: fun - function(x, f) { m - tapply(x, f, mean) ans - x - m[match(f, unique(f))] names(ans) - names(x) ans } May I ask what is the purpose of match(f,unique(f)) ? To remove the group means, I have be using: x-tapply(x,f,mean)[f]

[R] Your email message was blocked

2004-05-10 Thread jimmy
MailMarshal (an automated content monitoring gateway) has not delivered the following message: Message: Bfd6fc.0001.mml From:[EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Hello This is due to automatic rules that have determined that the intended recipient is

[R] need help: regression models

2004-05-10 Thread Rodrigo
hello, I am working with some data which i would like to find the best fit model for them. First, this data are in a matrix. Each of the columns are treatments and the raws are repetions for the each tratment. So, i've already maden one chart with all the boxplot graphic, for each treatment.

[R] sqlSave with underscores in table fieldname

2004-05-10 Thread Hoeven, Maarten van der
Hi group, I try to write a frame to a table (RODBC). I use colnames(temp6) - c(ind_id,ser_id,period_id,year,calc,mean) sqlSave(channel, temp6, tablename = series_indices_test,append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -99, fast = FALSE) This is

[R] trellis plot problem with R-1.9.0-1

2004-05-10 Thread Stephan Moratti
I tried following commands: amp~time|subject/trial #this was the grouping structure of the data plot(dip,inner=~condition,layout=c(2,2)) after the plot command I obtained this error message: Error in if(!any(cond.max.level - cond.current.level 0)(row-1)* : missing value where TRUE/FALSE

Re: [R] cgi/servlets/httpd in R

2004-05-10 Thread Christian Lederer
This was my point. Using RSPerl with ordinary CGI of course starts a new process for each request. But using fastcgi uses the same perl process for new requests. So, if you can use fastcgi in conjunction with RSPerl (which i did not try), there would be no startup overhead anymore. Christian

Re: [R] need help: regression models

2004-05-10 Thread Jason Turner
Rodrigo [EMAIL PROTECTED] said: I am working with some data which i would like to find the best fit model for them. First, this data are in a matrix. Each of the columns are treatments and the raws are repetions for the each tratment. Is the response in a separate vector, or is it one of the

RE: [R] Getting the groupmean for each person

2004-05-10 Thread Liaw, Andy
Both of you might have missed my question from Friday: For very long `x' (e.g., length=5), indexing by names can take a long time. See that thread for detail. (For small data, you can hardly tell the difference.) Also, I'm trying to write the function in a way that one can pass in more

RE: [R] Getting the groupmean for each person

2004-05-10 Thread Prof Brian Ripley
On Mon, 10 May 2004, Liaw, Andy wrote: Both of you might have missed my question from Friday: For very long `x' (e.g., length=5), indexing by names can take a long time. See that thread for detail. (For small data, you can hardly tell the difference.) That's solved in R-devel as of

Re: [R] trellis plot problem with R-1.9.0-1

2004-05-10 Thread Deepayan Sarkar
On Monday 10 May 2004 05:46, Stephan Moratti wrote: I tried following commands: amp~time|subject/trial #this was the grouping structure of the data plot(dip,inner=~condition,layout=c(2,2)) after the plot command I obtained this error message: Error in if(!any(cond.max.level -