Re: [R] RGUI Console settings

2004-08-03 Thread Prof Brian Ripley
On Wed, 4 Aug 2004, Duncan Mackay wrote: > Would someone like to comment on the relation between the "buffer bytes" > and "lines" settings in the console settings? Are they interdependent? Both are limits, and you need enough of each. > If so, how? And why allow both to be tweaked? If not, what

Re: [R] keep.source.pkgs()

2004-08-03 Thread Prof Brian Ripley
On Tue, 3 Aug 2004, Thomas Lumley wrote: > I can't remember the historical reason why utils isn't loaded in binary > form in 1.9.1. In r-devel they are all loaded from binary databases when > used. It's size. The R code for utils is relatively small (relative to stats and graphics, or lattice

Re: [R] basic questions: any place for them

2004-08-03 Thread Paul Lemmens
Hoi Tiago, --On dinsdag 3 augustus 2004 18:50 +0100 Tiago R Magalhaes <[EMAIL PROTECTED]> wrote: Once again I'm sorry for these basic questions and since predictably I'll have more of those if there's a basic-questions-list I would love to know more about it Recently we discussed, on this list, t

Re: [R] dots expansion

2004-08-03 Thread Viet Nguyen
Thanks to all who helped. I used your ideas and code samples to write the following (for the benefit of people who will search this list later): rbind.case <- function(..., name="case", values) { dots <- list(...); if (missing(values)) values <- 1:length(dots); if (length(values)!=length

[R] Order of messgaes/ missing messages

2004-08-03 Thread Jim Brennan
I am curious as to why I quite often receive responses to questions on the help before receiving the actual question. For example Mr Graves has responded to Mr Lumley's response to Mr Wegelin yet I ave not received Mr. Lumley's post while I have received the other two. Cheers, Jim [

Re: [R] lme fitted correlation of random effects: where is it?

2004-08-03 Thread Spencer Graves
You may also wish to consider "VarCorr". This function exists in both nlme and lme4. Someone else mentioned "getVarCov". However, that is not in the current lme4. hope this helps. spencer graves Thomas Lumley wrote: On Tue, 3 Aug 2004, Jacob Wegelin wrote: The print method

[R] RGUI Console settings

2004-08-03 Thread Duncan Mackay
Hi all, Would someone like to comment on the relation between the "buffer bytes" and "lines" settings in the console settings? Are they interdependent? If so, how? And why allow both to be tweaked? If not, what is the effect of changing "lines", but leaving "buffer bytes" the same? I wanted to be

RE: [R] lme fitted correlation of random effects: where is it?

2004-08-03 Thread Doran, Harold
I believe getVarCov() will give you what you need. Harold -Original Message- From: [EMAIL PROTECTED] on behalf of Thomas Lumley Sent: Tue 8/3/2004 8:36 PM To: Jacob Wegelin Cc: [EMAIL PROTECTED] Subject: Re: [R] lme fitted correlation

Re: [R] lme fitted correlation of random effects: where is it?

2004-08-03 Thread Thomas Lumley
On Tue, 3 Aug 2004, Jacob Wegelin wrote: > > The print method for lme *prints out* the fitted correlation matrix for > the random effects. Is there any way to get these values as an object in > R? I have examined the components of the lme object (called "junk" in the > example below) and the comp

Re: [R] Standard errors from glm

2004-08-03 Thread Peter Alspach
Dear Prof Ripley Thanks for your reply and clarification. However: 1. Regarding model.tables() returning "Design is unbalanced". Setting contrasts to Helmert does indeed make the design balanced, but model.tables() still returns "Design is unbalanced": > options()$contrasts unorder

Re: [R] Installing tseries package on MacOSX

2004-08-03 Thread Francisco J. Bido
Thanks for the tip. -F. On Aug 3, 2004, at 1:21 AM, Prof Brian Ripley wrote: On Tue, 3 Aug 2004, Francisco J. Bido wrote: I have R 1.9.1 on MacOSX. The automated package download appears broken in this version. Your version? It is not broken in the version R-core distributes, but you may be usin

[R] lme fitted correlation of random effects: where is it?

2004-08-03 Thread Jacob Wegelin
The print method for lme *prints out* the fitted correlation matrix for the random effects. Is there any way to get these values as an object in R? I have examined the components of the lme object (called "junk" in the example below) and the components of summary(junk) without finding these numbe

Re: [R] keep.source.pkgs()

2004-08-03 Thread Thomas Lumley
On Tue, 3 Aug 2004, Rolf Turner wrote: > > Thomas Lumley wrote: > > > Because, as you noted, the base packages are stored in binary form. This > > already speeds things up, and will have even more impact in 2.0.0 with > > "lazy loading" of functions. > > This CANNOT be the (complete) explan

Re: [R] keep.source.pkgs()

2004-08-03 Thread Rolf Turner
Thomas Lumley wrote: > > However attr(arima,"source") was still NULL (and of course comments > > were non-existant). Apparently the functions in stats get > > ***loaded*** from a binary file ``all.rda'' (in the > > .../library/stats/R directory) rather than getting read in from ascii > > files.

Re: [R] keep.source.pkgs()

2004-08-03 Thread A.J. Rossini
Thomas Lumley <[EMAIL PROTECTED]> writes: > Personally, I find this the easiest way to look at the source. You can > browse the source on https://svn.r-project.org/R/ if you are using a > binary distribution, rather than downloading the whole thing. Except that you probably don't want to, i.e. gr

Re: [R] write.table(NULL)

2004-08-03 Thread Prof Brian Ripley
On Tue, 3 Aug 2004, Thomas Lumley wrote: > On Tue, 3 Aug 2004, Jack Tanner wrote: > > > > write.table(NULL) > > Error in which(unlist(lapply(x, function(x) is.character(x) || > > is.factor(x : argument to "which" is not logical > > > > Is this correct behavior? It seems harsh to abort an ent

RE: [R] random seed puzzle

2004-08-03 Thread drf5n
> > On Mon, 2 Aug 2004 17:50:44 -0500, "Bickel, David" > > <[EMAIL PROTECTED]> wrote: > > > > >After reading the help page on set.seed, I am unsure about > > how to solve the following problem. I need to call function f > > a thousand times. The list of values returned by f, should be > > as random

Re: [R] write.table(NULL)

2004-08-03 Thread Thomas Lumley
On Tue, 3 Aug 2004, Jack Tanner wrote: > > write.table(NULL) > Error in which(unlist(lapply(x, function(x) is.character(x) || > is.factor(x : argument to "which" is not logical > > Is this correct behavior? It seems harsh to abort an entire run just > because one of the tables you generated h

Re: [R] keep.source.pkgs()

2004-08-03 Thread Thomas Lumley
On Tue, 3 Aug 2004, Rolf Turner wrote: > > However, after substantial experimentation, I am still at a loss to > get at the original source code for arima() (replete with comments) > save by accessing the original, ``unmade'' source for R. Not too > hard, but not exactly ``immediate''. Personally

[R] write.table(NULL)

2004-08-03 Thread Jack Tanner
> write.table(NULL) Error in which(unlist(lapply(x, function(x) is.character(x) || is.factor(x : argument to "which" is not logical Is this correct behavior? It seems harsh to abort an entire run just because one of the tables you generated happened to be NULL. -JT _

[R] keep.source.pkgs()

2004-08-03 Thread Rolf Turner
Recently Brian Ripley had occasion to mock my inability to see a comment in the code for arima(), in the stats package. After considerable dredging around in the r-news archives I found reference to keep.source() and keep.source.pkgs(), which I conjectured just ***might*** possibly be the ``obvio

Re: [R] Using MASSv3's example from 8.7 in R?

2004-08-03 Thread Prof Brian Ripley
It is in MASS4, and even in the R scripts for MASS3 in MASS/scripts3 in your R installation. And that is explained in the R complements on the book's web site. On Tue, 3 Aug 2004, Sven C. Koehler wrote: > Dear list! > > I am interested in learning about MLE and I wonder whether it is possible

RE: [R] Adjusting two continuous variables by one continuous vari able

2004-08-03 Thread Liaw, Andy
Graphically, you can use coplot() or lattice to see how the relationship between height and weight changes with age. With a linear model, you can do something like: lm(height ~ weight * age, ...) and work out the interpretation of the coefficients. HTH, Andy > From: Peter Tait > > Hi, > > I

Re: [R] basic questions: any place for them

2004-08-03 Thread Berton Gunter
As you know, R is not S-Plus, though they for the most part share a common syntax (S) and a lot of (nearly) identical functions with (nearly) identical behavior. Nevertheless, there's lots of stuff in S-Plus that's not in R and vice-versa. So you shouldn't expect to find all S-Plus functions in R.

[R] Adjusting two continuous variables by one continuous variable

2004-08-03 Thread Peter Tait
Hi, I want to look at the relationship between 2 continuous/quantitative variables while adjusting for a third continuous variable. For example: relationship between height and weight adjusted for age. As I understand it using a glm would work if I had a categorical variable (I could make age i

RE: [R] basic questions: any place for them

2004-08-03 Thread Liaw, Andy
> From: Tiago R Magalhaes > > Hi > I have two basic questions, and here they go, but I was wondering as > well where can I ask these basic questions without bothering you > people > > > I've used Splus and now I'm using R and there's some functions that I > can't simply find > > one: > sort

[R] basic questions: any place for them

2004-08-03 Thread Tiago R Magalhaes
Hi I have two basic questions, and here they go, but I was wondering as well where can I ask these basic questions without bothering you people I've used Splus and now I'm using R and there's some functions that I can't simply find one: sort.col that allows data.frames to be sort by a given

[R] Using MASSv3's example from 8.7 in R?

2004-08-03 Thread Sven C. Koehler
Dear list! I am interested in learning about MLE and I wonder whether it is possible to use the examples for maximum likelihood estimation given in 8.7 in MASSv3 with R? AFAIU R does not have a direct replacement for S-PLUS's ms() which the examples use for the fitting, but optim() may be of help

RE: [R] random seed puzzle

2004-08-03 Thread Liaw, Andy
My guess is that http://cran.r-project.org/src/contrib/Descriptions/rlecuyer.html might be relevant, too. Cheers, Andy > From: Duncan Murdoch > > On Mon, 2 Aug 2004 17:50:44 -0500, "Bickel, David" > <[EMAIL PROTECTED]> wrote: > > >After reading the help page on set.seed, I am unsure about > ho

Re: [R] attach data from tapply to dataframe

2004-08-03 Thread Gabor Grothendieck
Doran, Harold air.org> writes: : : I am working with a longitudinal data set in the long format. This data : set has three observations per grade level per year. Here are the first : 10 rows of the data frame: : : >tenn.dat[1:10,] : : year schid type grade gain se new cohort : : 6 2001 100

Re: [R] attach data from tapply to dataframe

2004-08-03 Thread Spencer Graves
Have you considered "cbind" and "rbind"? If your data.frame has factors, they could present problems with "rbind". Try 'sapply(tenn.dat, class)'. If you have only class character or numeric, use "cbind" to match the columns of tenn.dat both in name and class, then use "rbind" to combine it w

[R] attach data from tapply to dataframe

2004-08-03 Thread Doran, Harold
I am working with a longitudinal data set in the long format. This data set has three observations per grade level per year. Here are the first 10 rows of the data frame: >tenn.dat[1:10,] year schid type grade gain se new cohort 6 2001 155 4 33.1 3.5 4 3 7 2002 1000

Re: [R] nlminb vs optim

2004-08-03 Thread Thomas Lumley
On Tue, 3 Aug 2004, Eve Mathieu wrote: > Dear R-help group, > > I have to maximize a likelihood with 40 parameters and I want to compare > the MLE given by "nlminb" (Splus2000, on Windows) with those given by > "optim" (R, on Unix). > > 1) On Splus, > The algorithm "nlminb" seems to converge (the

Re: [R] (Lattice) How to improve the readability of a bwplot, i.e. separating groups somehow

2004-08-03 Thread Deepayan Sarkar
On Tuesday 03 August 2004 06:39, 8rino-Luca Pantani wrote: > Hi all, > first of all thanks for the answer to my previous question on lattice > some time ago. > In particular to Patrick Connolly for advices on netiquette (I hope > this time I'm doing right) > and to Deepayan Sarkar fro the help

[R] (no subject)

2004-08-03 Thread Matt Nunes
hello. I have a query about the Matrix package for R. I wrote some code a while ago using Matrix version 1.6.2 with an early version of R, to do some least squares for regression: xn [,1] [,2] [,3] [,4] [1,]1 0.7429352 0.5519528 0.4100652 [2,]1 0.7443713 0.5540886 0.4

RE: [R] dots expansion

2004-08-03 Thread Liaw, Andy
Duncan already gave the answer. Here's a bit more detail: rbindGroup <- function(...) { theList <- list(...) nGroup <- length(theList) size <- sapply(theList, nrow) result <- rbind(...) result <- cbind(result, rep(1:nGroup, each=size) result } You probably want to add mor

[R] nlminb vs optim

2004-08-03 Thread Eve Mathieu
Dear R-help group, I have to maximize a likelihood with 40 parameters and I want to compare the MLE given by "nlminb" (Splus2000, on Windows) with those given by "optim" (R, on Unix). 1) On Splus, The algorithm "nlminb" seems to converge (the parameters stabilize) , it stops after several itera

[R] (Lattice) How to improve the readability of a bwplot, i.e. separating groups somehow

2004-08-03 Thread 8rino-Luca Pantani
Hi all, first of all thanks for the answer to my previous question on lattice some time ago. In particular to Patrick Connolly for advices on netiquette (I hope this time I'm doing right) and to Deepayan Sarkar fro the help on lattice. Now, my nowaday problem. Please consider the following m

[R] strange tickmarks placing in image

2004-08-03 Thread Arne.Muller
Hello, I've a problem aligning tickmarks to an image. I've created a correlation matrix for 84 datasets. I'm visualizing the matrix as an image with colour coding according to the correlation coefficient. The 84 datasets are distributed over three factors, but the desgin is unbalanced, so that

Re: [R] How does R vary from SAS?

2004-08-03 Thread Duncan Murdoch
On Tue, 3 Aug 2004 15:51:43 +1000, "Briggs, Meredith M" <[EMAIL PROTECTED]> wrote: > >Hello > >I have to show that R has more functionality than SAS for MonteCarlo type exercises >involving matrix algebra. As I has little experience with SAS is anyone able to help. >I have a model written in R b

Re: [R] How to add a common title (or xlab, ylab) for multi-plots in the same window?

2004-08-03 Thread Martin Maechler
> "Sundar" == Sundar Dorai-Raj <[EMAIL PROTECTED]> > on Mon, 02 Aug 2004 12:53:43 -0500 writes: Sundar> F Duan wrote: >> I am using par(mfrow=c()) to plot multi-figures in the >> same window. And I like to put a common title (and xlab, >> ylab) for all of plots. I have

Re: [R] How to select a whole column? Thanks!

2004-08-03 Thread Paul Lemmens
Hoi Jinsong, --On dinsdag 3 augustus 2004 1:42 -0700 Jinsong Zhao <[EMAIL PROTECTED]> wrote: For instance, I hope to remove the V3~6 column, for all the value in those colume is zero. V3 V4 V5 V6 V7 V8 V9V10 1 0 0 0 0 0.000 0.000 0.000 0.000 2 0 0 0 0 0.000 0.000 0

Re: [R] How to select a whole column? Thanks!

2004-08-03 Thread Prof Brian Ripley
On Tue, 3 Aug 2004, Jinsong Zhao wrote: > I hope to remove a whole column from a data frame or matrix (> 2000 > columns). All value in the column are same. The first thing is to > select those columns. > > For instance, I hope to remove the V3~6 column, for all the value in > those colume is zer

RE: [R] How to select a whole column? Thanks!

2004-08-03 Thread Wayne Jones
What about: my.df<-data.frame(x=rnorm(20),y=rep(0,20),z=rep(1,20)) my.df[,!apply(my.df,2,sd)==0,drop=F] This uses the fact that a column with eaqual values has a standard deviation of 0. Regards Wayne -Original Message- From: Jinsong Zhao [mailto:[EMAIL PROTECTED] Sent: 03 Augu

[R] How to select a whole column? Thanks!

2004-08-03 Thread Jinsong Zhao
Dear all, I hope to remove a whole column from a data frame or matrix (> 2000 columns). All value in the column are same. The first thing is to select those columns. For instance, I hope to remove the V3~6 column, for all the value in those colume is zero. V3 V4 V5 V6 V7 V8 V9

[R] Data manipulation query

2004-08-03 Thread Vito Ricci
Hi, see ? quantile to obtain deciles of variable X1 see ? cut to divide the range of 'x' into intervals and codes the values in 'x' according to which interval they fall. se ? table to use the cross-classifying factors to build a contingency table of the counts at each combination of factor leve