Re: [R] lda source code

2003-10-02 Thread Uwe Ligges
Frank Gibbons wrote: Wei Geng, I asked the same question about six weeks ago, so let me try to answer it. The source for the entire package 'MASS' is in a single file, I believe (at least this is true on my Linux setup). The thread gets boring, but let me correct this belief: NO! There is

Re: [R] install from source again

2003-10-02 Thread Uwe Ligges
Erin Hodgess wrote: What does Error 255 stand for in the make bitmapdll, please? It depends. Some more lines of the error message would be helpful. Did have put the required sources (jpeg-6b, libpng) at the correct loactions in order to make the bitmapdll? Uwe Ligges Thanks, erin [EMAIL

[R] trouble with R com and python

2003-10-02 Thread [EMAIL PROTECTED]
hi there i tried to use R from python my pc is an intel 1600 with win98; python is python 2.2; R is rw1062, and R (D)COM Server V1.2 when i use the sample code provided in the readme.html, no problem, but when i try to read a file, a get a traceback error (please see code enclosed) has

Re: [R] permission problem on R install

2003-10-02 Thread Uwe Ligges
Erin Hodgess wrote: Dear R People: Here is the exact sequence of events: Making package base adding build stamp to DESCRIPTION C:/rsource/R-1.7.1/bin/rterm.exe: permission denied Do you have the *recent* version of the tool set from Brian Ripley's page? Do you use tar to unpack the sources?

Re: [R] R on fairly large machines

2003-10-02 Thread Peter Dalgaard BSA
Allan Tingey [EMAIL PROTECTED] writes: Hi, We are considering using R on a large problem that will require four 64 bit cpu's and 64Gb of ram and some flavor of unix. We are just wondering if R is going to be happy in this environment. If have experience with this please let me know.

Re: [R] fitting Markov chains

2003-10-02 Thread Martin Maechler
Tamas == Tamas Papp [EMAIL PROTECTED] on Wed, 1 Oct 2003 17:14:51 +0200 writes: Tamas I need to find a computationally simple process for the movement of Tamas interest rates. In this simplified model, an interest rate can have Tamas 3--5 possible values, and its movement is

[R] pmatch questions

2003-10-02 Thread Vito Muggeo
Dear all, Below there are two, simple - I suppose, questions on using pmatch(): pmatch(xx, c(cc,xxa)) [1] 2 pmatch(a, c(cc,xxa)) [1] NA pmatch(xx, c(cc,xxa,xxb)) [1] NA I would like that the second call returns also 2, and the third call returns c(2,3) is it possible? many thanks vito

AW: [R] pmatch questions

2003-10-02 Thread Unternährer Thomas, uth
Hi, This is maybe not a really nice solution but it gives you what you want which(regexpr(a, c(cc,xxa))!=-1) 2 which(regexpr(xx, c(cc,xxa,xxb))!=-1) 2 3 HTH Thomas -Ursprüngliche Nachricht- Von: Vito Muggeo [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 2. Oktober 2003 11:04 An:

Re: [R] pmatch questions

2003-10-02 Thread Uwe Ligges
Vito Muggeo wrote: Dear all, Below there are two, simple - I suppose, questions on using pmatch(): pmatch(xx, c(cc,xxa)) [1] 2 pmatch(a, c(cc,xxa)) [1] NA pmatch(xx, c(cc,xxa,xxb)) [1] NA I would like that the second call returns also 2, and the third call returns c(2,3) is it possible? You

Re: [R] r editors

2003-10-02 Thread Ko-Kang Kevin Wang
On Thu, 2 Oct 2003, forkusam wrote: I am programming on a windows system and have problems using notepad which is my main editor.Each time I try to open the editor from the R IDE, R crashes. Not sure what you meant by R IDE, do you mean Rgui? CAn someone tell me if I am doing anything

RE: [R] r editors

2003-10-02 Thread Rau, Roland
Hi, I can recommend two editors: - Emacs/XEmacs in conjunction with the ESS-package (ESS= Emacs Speaks Statistics). It is free software. However, it takes a while until it is working nicely - especially if you have no experience with Emacs/XEmacs. One of the nice features is that you can run R

Re: [R] r editors

2003-10-02 Thread Uwe Ligges
forkusam wrote: Hi , I am programming on a windows system and have problems using notepad which is my main editor.Each time I try to open the editor from the R IDE, R crashes. I guess it looks like R freezes (and R does *not* crash), because R waits until the editor is closed again. That's

Re: [R] r editors

2003-10-02 Thread Duncan Murdoch
On Thu, 2 Oct 2003 02:56:11 -0700 (PDT), you wrote: Hi , I am programming on a windows system and have problems using notepad which is my main editor.Each time I try to open the editor from the R IDE, R crashes. It shouldn't crash; can you give more details of how you're opening the editor, and

[R] Query: What is 'Trellis'?

2003-10-02 Thread Mrten Bjellerup
I'm an R-beginner and have found the function 'panel.mathdensity' in the full manual. R can't find the function and under 'Description' in the manual it says that they are available in Trellis. What is it and where can I find the function? Regards, Mrten Mrten Bjellerup Doctoral Student in

R: [R] r editors

2003-10-02 Thread Vito Muggeo
In addition to WinEdt and (X)Emacs of course, See also, http://www.crimsoneditor.com/ (freeware) http://www.jedit.org/ (freeware) http://www.editpadpro.com/ (non-freeware) I know that there exist Syntax Highlighting files for R, but I don't know where you can find them. best, vito -

[R] [[-,[[ default?

2003-10-02 Thread Wolski
Hi! I have implemented class specific behaviour of [[-.myclass-function(). How it is posible to call the [[.default on an object of myclass? Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics Ihnestrasse 73 14195 Berlin 'v' tel: 0049-30-84131285

Re: [R] var on a vector

2003-10-02 Thread Philippe Glaziou
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am an R newbie. I have a problem with computing a variance on a vector. data(cars) variance - function (x) mean(x^2)-mean(x)^2; variance(cars[,1]) [1] 27.4 var(cars[,1]) [1] 27.95918 What did I assume/understand wrong ? You wrongly

[R] multi-dimensional hash

2003-10-02 Thread Arne.Muller
Hello, I was wondering what's the best data structure in R for a multi-dimensional lookup table, and how to implement it. I've several categories say A, B, C ... and within each of these categories there are other categories such as a, b, c, ... . There can be up to 5 dimensions. The actual value

Re: [R] var on a vector

2003-10-02 Thread Matthias Kohl
[EMAIL PROTECTED] schrieb: Hello I am an R newbie. I have a problem with computing a variance on a vector. data(cars) variance - function (x) mean(x^2)-mean(x)^2; variance(cars[,1]) [1] 27.4 var(cars[,1]) [1] 27.95918 What did I assume/understand wrong ? TIA Hello,

Re: [R] Query: What is 'Trellis'?

2003-10-02 Thread Roger D. Peng
You need to load the `lattice' library in R. Try library(lattice) panel.mathdensity function (dmath = dnorm, args = list(mean = 0, sd = 1), n = 50, col, col.line = reference.line$col, lwd = reference.line$lwd, lty = reference.line$lty, ...) { reference.line -

RE: [R] [[-,[[ default?

2003-10-02 Thread Henrik Bengtsson
It depends, but a quick answer is that you in general should use NextMethod() as far as possible to avoid ad hoc solutions and tricky side effects. Example: x - list(a=1:10, b=base::letters); class(x) - ClassA; [[.ClassA - function(object, name) { # Here you are allowed to do something, cf.

Re: [R] multi-dimensional hash

2003-10-02 Thread Thomas W Blackwell
Arne - In the past, I've used a data frame for the lookup table and the and of individual logical vectors to select rows from it. Here's a simplified version of the selector function I wrote. My mail editor does not balance parentheses, so I don't guarantee that this version is syntactically

[R] Doubly Multivariate LME

2003-10-02 Thread Harold Doran
Dear R: I am trying to fit a doubly multivariate LME (DM) where I have two response variables measured on two occasions per person. Specifically, reading and math scores measured at the beginning and ending of a school year. The response variables have a correlation of r = .85. The response

Re: [R] how calculate mean for each group

2003-10-02 Thread Spencer Graves
An alternative to renaming columns in the ouput of aggregate is to provide names in the by list as follows: aggregate(df$treatment, list(gp=df$group, dup=df$duplicate), mean) hope this helps. spencer graves Marc Schwartz wrote: On Wed, 2003-10-01 at 20:15, [EMAIL PROTECTED] wrote: Hello,

[R] Power calculation

2003-10-02 Thread Padmanabhan, Sudharsha
HI, I ran into trouble trying to do a power computation. In the presence of interaction, I am simulating clinical trials in multiple centers. Suppose I have 3 centers, each with 20 patients, 10 in active drug and 10 in placebo and I have efficacy data for the 60 patients, ie, initial and

Re: [R] how calculate mean for each group

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 08:47, Spencer Graves wrote: An alternative to renaming columns in the ouput of aggregate is to provide names in the by list as follows: aggregate(df$treatment, list(gp=df$group, dup=df$duplicate), mean) hope this helps. spencer graves SNIP Spencer, Yeah, knew

[R] Query: weighting cells in histogram

2003-10-02 Thread Mårten Bjellerup
I have the 'breaks' for the histogram ('hist') but I want weight the cells instead of using actual observations. I thought that using freq=FALSE implied that the numbers in 'x' were weights but this turned out to be wrong. Any help and/or comment is very much appreciated. Regards, Mårten

Re: [R] Query: What is 'Trellis'?

2003-10-02 Thread Deepayan Sarkar
See http://cm.bell-labs.com/cm/ms/departments/sia/project/trellis/ This is implemented in the lattice package in R, which you can load by library(lattice) and perhaps start with help(Lattice) On Thursday 02 October 2003 05:50, Mrten Bjellerup wrote: I'm an R-beginner and have found the

RE: [R] how calculate mean for each group

2003-10-02 Thread Simon Fear
A little more succinctly and I hope also helpful: with(df, aggregate(list(mean=treatment), list(group = group, duplicate = duplicate), mean)) Note that the name of the summary of treatment is likely best to be different from the name of the treatment variable itself. It is tempting to do

Re: [R] Query: weighting cells in histogram

2003-10-02 Thread Thomas W Blackwell
Marten - I don't know exactly what interpretation you have in mind for weights, but if you assign the value of hist() to a variable tmp, you can then assign the component tmp$counts any value you like, and plot the result as a histogram using plot(tmp). See the section Value: in

[R] using a string as the formula in rlm

2003-10-02 Thread Rajarshi Guha
Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus a series of models would be m1 - rlm(V1 ~ V2 + V3 + V4, data) m2 - rlm(V1 ~ V2 + V5 + V7, data) m3 - rlm(V1 ~ V2 + V8 + V9, data) I would like to

Re: [R] Query: weighting cells in histogram

2003-10-02 Thread Spencer Graves
hist returns a list, to which you can apply your weights. Alternatively, in R 1.7.1, typing hist [without the quotes ()] at a commands prompt reveals a call to UseMethod. 'methods(hist)' identifies functions hist.default and hist.POSIXt. Typing hist.default prodused the R code,

RE: [R] using a string as the formula in rlm

2003-10-02 Thread Liaw, Andy
It may help you to read Bill Venables' column in R News http://cran.r-project.org/doc/Rnews/Rnews_2002-2.pdf, pages 24-26. Andy -Original Message- From: Rajarshi Guha [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 11:25 AM To: [EMAIL PROTECTED] Subject: [R] using a

RE: [R] how calculate mean for each group

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 10:11, Simon Fear wrote: A little more succinctly and I hope also helpful: with(df, aggregate(list(mean=treatment), list(group = group, duplicate = duplicate), mean)) Note that the name of the summary of treatment is likely best to be different from the name

[R] (no subject)

2003-10-02 Thread Arunkumar Arumugam
Dear Sir, I am system administrator for sun solaris 2.8. I have no idea about the functioning of the R software. I had installed. I tried testing some of the programs and functions. I read in the manual that plot(x,y) functions automatically generates a graphical window and plot.

Re: [R] using a string as the formula in rlm

2003-10-02 Thread Uwe Ligges
Rajarshi Guha wrote: Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus a series of models would be m1 - rlm(V1 ~ V2 + V3 + V4, data) m2 - rlm(V1 ~ V2 + V5 + V7, data) m3 - rlm(V1 ~ V2 + V8 + V9, data)

RE: [R] r editors

2003-10-02 Thread Gabor Grothendieck
What you want to do is startup up a second window/process separately from R so you have R open in one window and your editor open in another window. When you make a change to the source, just write it out without closing the editor, move to the R window and then source it from R:

Re: [R] using a string as the formula in rlm

2003-10-02 Thread Spencer Graves
Have you considered the following: fmla - formula(sprintf('V1 ~ V%g + V%g + V%g',2,3,4)) hope this helps. spencer graves Rajarshi Guha wrote: Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus

Re: [R] using a string as the formula in rlm

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 10:25, Rajarshi Guha wrote: Hi, I am trying to build a series of rlm models. I have my data frame and the models will be built using various coulmns of the data frame. Thus a series of models would be m1 - rlm(V1 ~ V2 + V3 + V4, data) m2 - rlm(V1 ~ V2 + V5 + V7,

[R] EMACS/ESS problems

2003-10-02 Thread Murad Nayal
Hello all, since we're on the topic of R-editors. I am using emacs/ess on a unix workstation (to interact with R and have been having a little problem. I usually write the R commands I need to run in a separate buffer then copy and paste them into the *R* buffer for evaluation. The problem is,

[R] R] Re: Mandelbrot set and C code --

2003-10-02 Thread Rex Bryan Dell1700
Wizards... With regards to Mario's Mandelbrot.c programming -- would some kind wizard show how to compile and run his code on a Win installation. I'm looking for a simple cookbook example in the same manner that Mario show for Linux. I have Win2000 on this machine. REX --- Original

Re: [R] EMACS/ESS problems

2003-10-02 Thread Murad Nayal
Hi, A.J. Rossini wrote: 1. I've never seen this behavior, ever. Do you get the same with C-c C-r (highlight region, then C-c C-r sends to the R process in Emacs). Or, if you use C-c C-n to step through the lines? maybe my environment is not set up correctly. C-c C-r doesn't do

[R] lme vs. aov with Error term

2003-10-02 Thread array chip
Hi, I have a question about using lme and aov for the following dataset. If I understand correctly, using aov with an Error term in the formula is equivalent to using lme with default settings, i.e. both assume compound symmetry correlation structure. And I have found that equivalency in the

Re: [R] EMACS/ESS problems

2003-10-02 Thread A.J. Rossini
1. I've never seen this behavior, ever. Do you get the same with C-c C-r (highlight region, then C-c C-r sends to the R process in Emacs). Or, if you use C-c C-n to step through the lines? 2. [EMAIL PROTECTED] might be a better place to send this. Murad Nayal [EMAIL PROTECTED] writes:

RE: [R] R] Re: Mandelbrot set and C code --

2003-10-02 Thread Liaw, Andy
You need to install the tools needed to build packages from source. You can read about it in Q3.1 of R for Windows FAQ. Andy -Original Message- From: Rex Bryan Dell1700 [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 12:15 PM To: [EMAIL PROTECTED] Subject: [R] R] Re:

Re: [R] EMACS/ESS problems

2003-10-02 Thread TyagiAnupam
Try eval-linestep C-c C-n in ESS (no cut and paste), and omit the semi-colon at the end of the statement. In a message dated 10/2/03 11:12:37 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: Hi, It didn't help in this case in *scratch* v = c(1, # 2, # 3); highlight

[R] indexing a vector

2003-10-02 Thread morozov
Dear All: I'd like to know how to sort and then index a vector of floats by several levels in R. For example x-rnorm(100) MyLevels-quantile(x,probs=c(0,.5,1)) MyLevels 0% 50%100% -2.11978442 -0.03770613 2.00186397 next i want to replace each x[i] in x by 1,2,3 or 4

[R] RE: [S] lme vs. aov with Error term

2003-10-02 Thread array chip
Hi Bert, Thanks for the suggestions. I tried lme with different control parameters, and also tried using ML, instaed of REML, but still got the same answers. Yes, I hope some gurus on this list could give me some hints. Thanks --- Gunter, Bert [EMAIL PROTECTED] wrote: But they are close.

Re: [R] indexing a vector

2003-10-02 Thread Jason Turner
morozov wrote: Dear All: I'd like to know how to sort and then index a vector of floats by several levels in R. For example x-rnorm(100) MyLevels-quantile(x,probs=c(0,.5,1)) MyLevels 0% 50%100% -2.11978442 -0.03770613 2.00186397 next i want to replace each x[i] in

[R] combination levels

2003-10-02 Thread Paul Green
Is there a function in R that will give all combination levels. For example, I see there is a choose function that gives choose(5,2) 10 but I want 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 This is a simple

Re: [R] (no subject)

2003-10-02 Thread Ko-Kang Kevin Wang
On 30 Sep 2003, Arunkumar Arumugam wrote: I tried testing some of the programs and functions. I read in the manual that plot(x,y) functions automatically generates a graphical window and plot. that does not happens in my installation. Ummm...can you be a bit more precise? What exactly

Re: [R] indexing a vector

2003-10-02 Thread Ross Ihaka
morozov wrote: x-rnorm(100) MyLevels-quantile(x,probs=c(0,.5,1)) MyLevels 0% 50%100% -2.11978442 -0.03770613 2.00186397 next i want to replace each x[i] in x by 1,2,3 or 4 depending on which quantile that x[i] falls. How do I do that in a vector fashion? Take a look

Re: [R] indexing a vector

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 12:40, morozov wrote: Dear All: I'd like to know how to sort and then index a vector of floats by several levels in R. For example x-rnorm(100) MyLevels-quantile(x,probs=c(0,.5,1)) MyLevels 0% 50%100% -2.11978442 -0.03770613

[R] Re: [S] lme vs. aov with Error term

2003-10-02 Thread array chip
Jose, Thank you very much for the explanation! what about if I specify using ML instead of REML in the lme? I found that I still got different answers even I use ML in the lme call. And in any case, should I trust lme more than aov, or vice versa? Thanks again --- [EMAIL PROTECTED] wrote:

Re: [R] combination levels

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 13:40, Paul Green wrote: Is there a function in R that will give all combination levels. For example, I see there is a choose function that gives choose(5,2) 10 but I want 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3

[R] Search for a text string and write position related data to a file

2003-10-02 Thread Karin Gerard Preusting
Dear all, I just started using R today. What I need to do is find a text string in a (large) text file and than copy the some position related lines (or text) to an other text file. Is this possible with R? Example: Search string is: Date write line of search string +0, +2, +6, +7, +8, +9

Re: [R] Search for a text string and write position related data to a file

2003-10-02 Thread Peter Dalgaard BSA
Karin Gerard Preusting [EMAIL PROTECTED] writes: Dear all, I just started using R today. What I need to do is find a text string in a (large) text file and than copy the some position related lines (or text) to an other text file. Is this possible with R? It's hardly a typical R

Re: [R] EMACS/ESS problems

2003-10-02 Thread Rich Heiberger
It looks like you are not using ESS correctly. ESS is designed to work from a buffer containing a file whose name has the .r extension. Thus, open a file, for example, C-x C-f myfile.r and then start using R. My diagnosis is based on your line highlight: (either in a text buffer or *ESS*)

[R] Plot can't forget bad parameters

2003-10-02 Thread Ross Boylan
When I give plot some bad paramaters, it keeps giving me error messages forever after. I think the last time this happened, I even got the error messages for completely unrelated, non-graphical functions. Here's a recent example: plot(it[[31]][,c(1, 3)], type=b, usr=c(0, 20, -20, 5)) Warning

[R] serializing R objects

2003-10-02 Thread Rajarshi Guha
Hi, is there any way that an R object (say a list of rlm models) could be serialized to disk to be read in at a later time? --- Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9

Re: [R] Plot can't forget bad parameters

2003-10-02 Thread Thomas Lumley
On Thu, 2 Oct 2003, Ross Boylan wrote: When I give plot some bad paramaters, it keeps giving me error messages forever after. I think the last time this happened, I even got the error messages for completely unrelated, non-graphical functions. snip Is this a bug, or have I missed something?

RE: [R] Plot can't forget bad parameters

2003-10-02 Thread Ross Boylan
On Thu, 2003-10-02 at 16:54, [EMAIL PROTECTED] wrote: Try rm(last.warning) -Original Message- From: Ross Boylan [mailto:[EMAIL PROTECTED] Sent: Friday, 3 October 2003 9:10 AM To: r-help Subject: [R] Plot can't forget bad parameters When I give plot some bad paramaters, it

Re: [R] serializing R objects

2003-10-02 Thread Marc Schwartz
On Thu, 2003-10-02 at 18:19, Rajarshi Guha wrote: Hi, is there any way that an R object (say a list of rlm models) could be serialized to disk to be read in at a later time? See ?save and ?load HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing

Re: [R] EMACS/ESS problems

2003-10-02 Thread Murad Nayal
that was exactly what I was missing, Everything now works as advertised. Thank you all so much for the help. you just turned my already very satisfying experience using R into a even more enjoyable one. all the best Rich Heiberger wrote: It looks like you are not using ESS correctly. ESS