Re: [R] (robust) mixed-effects model with covariate

2006-08-03 Thread Spencer Graves
What do you get from the following: max(with(df1, table(Subj, Time)))? With cases like this, lme gives an answer with a bogus distinction between variance components for time and residuals. I don't know about aov or JMP, but I know that varcomp in S-Plus also

[R] run self written functions

2006-08-03 Thread Antje
Hello, I'm not sure if I'm in the right place with my question... I'm running R on Windows and wrote a function and saved it as .R file. It looks like this: bmi - function(weight, height) { bmi - weight / height^2 bmi } If I want to use this function, I have to mark everything and then

[R] From 2.2.1 to 2.3

2006-08-03 Thread Antonio_Paredes
Hello everyone. Currently I am running R 2.2.1 (windows), and I will like to update to 2.3. I wanted to ask if it is possible to update without having to removed 2.2.1; or do I first need to delete 2.2.1? Thank you very much. Tony [[alternative HTML version deleted]]

[R] [R-pkgs] spatstat 1.9-4

2006-08-03 Thread Adrian Baddeley
Version 1.9-4 of package 'spatstat' has been sent to CRAN. It includes new code for perfect simulation of point processes and various improvements. The release notes are available at http://www.spatstat.org/spatstat/current/spatstatRELEASE-NOTES-1.9-4 Adrian Baddeley

[R] Math elements in panel headers of lattice plots?

2006-08-03 Thread Fredrik Karlsson
Hi, I would like to put a math expression in the header of a panel. Acctually, I need to substitute the 'a' to a script-a in a transcription contained in the factor by which the data set is divided. So, /spak/ should be /spAk/ where A should be a script-a. I guessed that math expressions would be

Re: [R] From 2.2.1 to 2.3

2006-08-03 Thread Prof Brian Ripley
On Wed, 2 Aug 2006, [EMAIL PROTECTED] wrote: Hello everyone. Currently I am running R 2.2.1 (windows), and I will like to update to 2.3. I wanted to ask if it is possible to update without having to removed 2.2.1; or do I first need to delete 2.2.1? There is no such version as `2.3', as

Re: [R] From 2.2.1 to 2.3

2006-08-03 Thread Ulrich Keller
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f [EMAIL PROTECTED] wrote: Hello everyone. Currently I am running R 2.2.1 (windows), and I will like to update to 2.3. I wanted to ask if it is possible to update without having to removed 2.2.1;

Re: [R] read.spss and umlaut

2006-08-03 Thread Thomas Kuster
Hello Am Mittwoch, 2. August 2006 17.11 schrieb Thomas Lumley: This sounds like a conflict between encodings -- eg if R is assuming UTF-8 and the file is encoding in Latin-1 then the sequence U+00FC : LATIN SMALL LETTER U WITH DIAERESIS U+0072 : LATIN SMALL LETTER R is coded as FC72 in the

Re: [R] run self written functions

2006-08-03 Thread Thomas Kuster
Hello Am Donnerstag, 3. August 2006 09.36 schrieb Antje: Hello, I'm not sure if I'm in the right place with my question... I'm running R on Windows and wrote a function and saved it as .R file. It looks like this: bmi - function(weight, height) { bmi - weight / height^2 bmi }

Re: [R] Summary method needed?

2006-08-03 Thread Heinz Tuechler
At 21:04 02.08.2006 +0100, Prof Brian Ripley wrote: On Wed, 2 Aug 2006, Christian Hennig wrote: Thank you Brian! I'm updating my fpc package at the moment and will add some new functions. I learned that there should be print and summary methods for the key functions. for

[R] geodesic distance

2006-08-03 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 __

Re: [R] Summary method needed?

2006-08-03 Thread Martin Maechler
HeinzT == Heinz Tuechler [EMAIL PROTECTED] on Thu, 03 Aug 2006 09:39:35 +0100 writes: HeinzT At 21:04 02.08.2006 +0100, Prof Brian Ripley wrote: On Wed, 2 Aug 2006, Christian Hennig wrote: Thank you Brian! I'm updating my fpc package at the moment and will

[R] NLME: Problem with plotting ranef vs a factor

2006-08-03 Thread Greg Distiller
Hi I am following the model building strategy that is outlined in the Pinheiro and Bates book wrt including covariates but am having a problem with the plot. Basically I am using 4 covariates (1 of them is continuous) and 3 of them are fine but the 4th one is being shown as a scatterplot

[R] question about dll crashing R

2006-08-03 Thread Benn Fine
I have ported some R code to C to make it faster. I can perform .Call(foobar,) once and it works fine. Absolutely correct answer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call .Call(foobar) seperately more than two tims it

Re: [R] best way to calculate per-parameter differences in across-subject means

2006-08-03 Thread René J.V. Bertin
Thanks, I'll look at that. In the meantime, the code below is what I came up with myself. It does what I want # SelectCases(dat,crit) == subset(dat, crit, drop=FALSE) SENSICK.AvScores- function( dat=SENSICK.items.tr ) { n-nlevels(dat$Symptom) data.frame(

Re: [R] mult comp significance

2006-08-03 Thread Spencer Graves
I read two questions: physical meaning and how to display only significant differences. PHYSICAL MEANING A p value is the probability of obtaining by chance alone a result at least as extreme as what we observe. A simultaneous or adjusted p value is the probability that

Re: [R] Tcltk package

2006-08-03 Thread Adrian DUSA
On Tuesday 01 August 2006 19:24, John McHenry wrote: [...] Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available is 2.2.1. Oh, but there is... right on CRAN. For Dapper just add this line to your sources.list: deb

[R] Default first argument in assignment function possible?

2006-08-03 Thread Heinz Tuechler
Dear All, is there a possibility to provide a default for the first argument in an assignment function? I could not find out if and how. You see in the example below that not explicitly stating the first argument leads to errors. Thanks, Heinz Tüchler ### example of assignment function

Re: [R] NLME: Problem with plotting ranef vs a factor

2006-08-03 Thread Dirk Enzmann
Greg, be careful using attach() and detach(). From the syntax snippets you showed it seems that you did create an object pcat (factor variable), but you did not change the respective variable in your data frame. Try to remove pcat and see what happens do the results of lme()! Dirk

Re: [R] random effects with lmer() and lme(), three random factors

2006-08-03 Thread Spencer Graves
In theory, 'lme' may be able to handle crossed random effects, but I don't know how to do it. I've used 'lmer' for such models, and your 'lmer' code looks plausible to me. Therefore, I would be inclined to believe the 'lmer' results. To remove any lingering doubt, I

Re: [R] tcl/tk bind destroy event

2006-08-03 Thread Jean Coursol
Perhaps Destroy key is unknown by Tcl; it is not in the Event modifiers table in Welch Book... But try with Control-L or Shift-Control_L, it runs (but not with Control_L-Shift ??). Use xmodmap to see the current mappings from keys to modifiers. Jean Coursol On Wed, 2 Aug 2006, Franco Mendolia

[R] between-within anova: aov and lme

2006-08-03 Thread William Simpson
I have 2 questions on ANOVA with 1 between subjects factor and 2 within factors. 1. I am confused on how to do the analysis with aov because I have seen two examples on the web with different solutions. a) Jon Baron (http://www.psych.upenn.edu/~baron/rpsych/rpsych.html) does 6.8.5 Example 5:

Re: [R] tcl/tk bind destroy event

2006-08-03 Thread Franco Mendolia
Hi! Perhaps Destroy key is unknown by Tcl; it is not in the Event modifiers table in Welch Book... I think the Destroy key is known, because when destroying the window with Alt-F4 or the littel x in the topcorner my function exitProg is executed. What I actually search for is a possibility

[R] Invoking R on UNIX Command line from a PERL CGI

2006-08-03 Thread Shalini Sridhar
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] tcl/tk bind destroy event

2006-08-03 Thread Peter Dalgaard
Jean Coursol [EMAIL PROTECTED] writes: Perhaps Destroy key is unknown by Tcl; it is not in the Event modifiers table in Welch Book... But try with Control-L or Shift-Control_L, it runs (but not with Control_L-Shift ??). I don't think that is it. As I read it, Tk catches the Destroy event

Re: [R] tcl/tk bind destroy event

2006-08-03 Thread Franco Mendolia
I don't think that is it. As I read it, Tk catches the Destroy event alright, but the problem is that it is too late: the window destruction is already in motion at the time and there's no way to undestroy it from within binding. I think you need to create a wm protocol handler for

[R] problem with factor in list (same name for diffrent category)

2006-08-03 Thread Thomas Kuster
Hello I try to ignore the problems with the umlaut. I read the file in with: library(foreign) daten - read.spss(filename) Then I want select a Vorlage (vote), but if I want select for example [6] and not 6 and 7 how can I select it? The real name is a other problem, but I can solve this via

Re: [R] Vector DF [a, b] to replace values :was Finding the position of a variable in a data.frame

2006-08-03 Thread John Kane
--- jim holtman [EMAIL PROTECTED] wrote: ?which which(Df = 50, arr.ind=T) row col 5 5 4 This works very nicely as has some other suggestions on how to replace a value. Assuming that I have more than one correction to make where Df = 50, can I use vectors in the Df[] to do this. My

[R] how to use the EV AND condEV from BMA's results?

2006-08-03 Thread zhijie zhang
Dear friends, In R, the help of bic.glm tells the difference between postmean(the posterior mean of each coefficient from model averaging) and condpostmean(the posterior mean of each coefficient conditional on the variable being included in the model), But it's still unclear about the results

Re: [R] Vector DF [a, b] to replace values :was Finding the position of a variable in a data.frame

2006-08-03 Thread Peter Dalgaard
John Kane [EMAIL PROTECTED] writes: --- jim holtman [EMAIL PROTECTED] wrote: ?which which(Df = 50, arr.ind=T) row col 5 5 4 This works very nicely as has some other suggestions on how to replace a value. Assuming that I have more than one correction to make where Df =

[R] bringToTop without focus?

2006-08-03 Thread christian.ritter
Hi all who know R on Windows, Quick question: Is there a way to do bringToTop(stay=TRUE) without giving focus? I would like to pop a graph window but I would like to preserve focus in the window which I was in before. Thanks for any lead, Chris __

Re: [R] bringToTop without focus?

2006-08-03 Thread Duncan Murdoch
On 8/3/2006 9:13 AM, [EMAIL PROTECTED] wrote: Hi all who know R on Windows, Quick question: Is there a way to do bringToTop(stay=TRUE) without giving focus? I would like to pop a graph window but I would like to preserve focus in the window which I was in before. No, there's no way to do

[R] Looking for transformation to overcome heterogeneity of variances

2006-08-03 Thread Paul Smith
Dear All My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order to be able to use ANOVA. Unfortunately, no transformation that I have

Re: [R] read.spss and umlaut

2006-08-03 Thread Thomas Lumley
On Thu, 3 Aug 2006, Thomas Kuster wrote: Hello Am Mittwoch, 2. August 2006 17.11 schrieb Thomas Lumley: This sounds like a conflict between encodings -- eg if R is assuming UTF-8 and the file is encoding in Latin-1 then the sequence U+00FC : LATIN SMALL LETTER U WITH DIAERESIS U+0072 : LATIN

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

2006-08-03 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: Dear All My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order to be able to use ANOVA.

[R] get() in sapply() in with()

2006-08-03 Thread Heinz Tuechler
Dear All, applying some function within a with() function I wanted to use also sapply() and get() to form a data.frame, but did not succede. Below is a simplified example. It is possible to use sapply() within a with() function, it is also possible to use get() within a with() function, but when

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

2006-08-03 Thread Paul Smith
On 03 Aug 2006 15:45:10 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order

[R] efficient way to make NAs of empty cells in a factor (or character)

2006-08-03 Thread Henrik Parn
Dear all, I have some csv-files (originating from Excel-files) containing empty cells. In my example file I have four variables of different classes, each with some empty cells in the original csv-file: test - read.csv2(test.csv, dec=.) test id id2 x y 1 a 1 NA 2 b e NA 2.2

Re: [R] bringToTop without focus?

2006-08-03 Thread christian.ritter
Thanks for fast response. 'Had another look at the problem and found a partial but nice solution which will solve my present problem and might be useful to others. Here is the context: In fact I have all my data and stuff in Excel and I use R(D)COM with Rexcel to communicate with R and do some

[R] Vectorizing a for loop

2006-08-03 Thread Daniel Gerlanc
Hello all, Consider the following problem: There are two vectors: rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) I want to create a matrix with dimensions length(rows) x length(columns): res - matrix(nrow = length(rows), ncol = length(columns)) If i and j are the row and column

[R] questions on plotting dedrograms

2006-08-03 Thread scheidler
Hi, i've two questions concerning the plot of a dendrogram. first, i use hclust for clustering and if i plot the dendrogram, then the maximal height is the maximal dissimilarity found in my data. but i want to have a arbitary maximal height. for example if the maximal dissimilarity in my data

[R] questions on plotting dedrograms

2006-08-03 Thread scheidler
Hi, i've two questions concerning the plot of a dendrogram. first, i use hclust for clustering and if i plot the dendrogram, then the maximal height is the maximal dissimilarity found in my data. but i want to have a arbitary maximal height. for example if the maximal dissimilarity in my data

Re: [R] efficient way to make NAs of empty cells in a factor (orcharacter)

2006-08-03 Thread Dimitris Rizopoulos
try to use the 'na.strings' argument of read.csv(), e.g., test - read.csv(test.csv, na.strings = ) 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

Re: [R] Vectorizing a for loop

2006-08-03 Thread Neuro LeSuperHéros
Hi, Try this: rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) expanded -expand.grid(rows,columns) abslist -abs(ex$Var1-ex$Var2) res - matrix(abslist,nrow = length(rows), ncol = length(columns)) Neurorox From: Daniel Gerlanc [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To:

Re: [R] Vectorizing a for loop

2006-08-03 Thread Thomas Lumley
On Thu, 3 Aug 2006, Daniel Gerlanc wrote: Hello all, Consider the following problem: There are two vectors: rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) I want to create a matrix with dimensions length(rows) x length(columns): res - matrix(nrow = length(rows), ncol =

Re: [R] Vectorizing a for loop

2006-08-03 Thread Petr Pikal
Hi outer(rows, columns, function(x,y) abs(x-y)) shall do it. HTH Petr On 3 Aug 2006 at 10:10, Daniel Gerlanc wrote: Date sent: Thu, 3 Aug 2006 10:10:46 -0400 From: Daniel Gerlanc [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject:

Re: [R] Vectorizing a for loop

2006-08-03 Thread Neuro LeSuperHéros
Sorry, I used ex instead of expanded (was working name). rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) expanded -expand.grid(rows,columns) abslist -abs(expanded$Var1-expanded$Var2) res - matrix(abslist,nrow = length(rows), ncol = length(columns)) Désolé encore Neuro From: Daniel

Re: [R] Vectorizing a for loop

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 10:10 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There are two vectors: rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) I want to create a matrix with dimensions length(rows) x length(columns): res - matrix(nrow =

Re: [R] Vectorizing a for loop

2006-08-03 Thread Eik Vettorazzi
res-outer(rows,columns,FUN=function(x,y) abs(x-y)) will help you. Am Thu, 03 Aug 2006 16:10:46 +0200 schrieb Daniel Gerlanc [EMAIL PROTECTED]: Hello all, Consider the following problem: There are two vectors: rows - c(1, 2, 3, 4, 5) columns - c(10, 11, 12, 13, 14) I want to create a

Re: [R] Vectorizing a for loop

2006-08-03 Thread Dimitris Rizopoulos
try this: abs(outer(rows, columns, -)) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/

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

2006-08-03 Thread Paul Smith
On 03 Aug 2006 16:32:38 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in

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

2006-08-03 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: On 03 Aug 2006 15:45:10 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical

Re: [R] get() in sapply() in with()

2006-08-03 Thread Thomas Lumley
On Thu, 3 Aug 2006, Heinz Tuechler wrote: Dear All, applying some function within a with() function I wanted to use also sapply() and get() to form a data.frame, but did not succede. Below is a simplified example. It is possible to use sapply() within a with() function, it is also possible

[R] bullseye or polar display of circular data

2006-08-03 Thread Michael Jerosch-Herold
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 apex of the heart as you move from

Re: [R] question about dll crashing R

2006-08-03 Thread Thomas Lumley
On Thu, 3 Aug 2006, Benn Fine wrote: I have ported some R code to C to make it faster. I can perform .Call(foobar,) once and it works fine. Absolutely correct answer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call

Re: [R] get() in sapply() in with()

2006-08-03 Thread Heinz Tuechler
Thank you, Thomas! It helps a lot to know that something is impossible and that I have to look for a different kind of solution. Heinz At 07:33 03.08.2006 -0700, Thomas Lumley wrote: On Thu, 3 Aug 2006, Heinz Tuechler wrote: Dear All, applying some function within a with() function I wanted

Re: [R] efficient way to make NAs of empty cells in a factor (or character)

2006-08-03 Thread Petr Pikal
Hi try to set na.strings = in calling read.csv2. Works for me is.na(read.delim(clipboard, na.strings=)$mono) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE read.delim(clipboard, na.strings=)$mono [1] hruby hruby jemny jemny nejhrubsi nejhrubsi standard standard

Re: [R] run self written functions

2006-08-03 Thread Dieter Menne
Antje niederlein-rstat at yahoo.de writes: I'm not sure if I'm in the right place with my question... I'm running R on Windows and wrote a function and saved it as .R file. It looks like this: bmi - function(weight, height) { bmi - weight / height^2 bmi } If I want to use this

[R] levels of an array (strings and numbers)

2006-08-03 Thread Alessandro Antonucci
Reading a csv file (db.csv) as: yes,full no,full no,empty I can use the command 'levels' to extract the different values appearing for each column as follows: d-read.csv(db.csv) levels(d[,2]) which returns [1] empty full while, doing the same with a numerical csv file as: 1,6 0,6 0,7

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

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 07:46 -0700, 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

Re: [R] Vector DF [a, b] to replace values :was Finding the position of a variable in a data.frame

2006-08-03 Thread John Kane
--- Peter Dalgaard [EMAIL PROTECTED] wrote: John Kane [EMAIL PROTECTED] writes: --- jim holtman [EMAIL PROTECTED] wrote: ?which which(Df = 50, arr.ind=T) row col 5 5 4 This works very nicely as has some other suggestions on how to replace a value. Assuming

Re: [R] question about dll crashing R

2006-08-03 Thread Prof Brian Ripley
On Thu, 3 Aug 2006, Thomas Lumley wrote: On Thu, 3 Aug 2006, Benn Fine wrote: I have ported some R code to C to make it faster. I can perform .Call(foobar,) once and it works fine. Absolutely correct answer. If I put a loop inside foobar and run the main code routine more

Re: [R] Looking for transformation to overcome heterogeneity ofvariances

2006-08-03 Thread Berton Gunter
I know I'm coming late to this, but ... Is someone able to suggest to me a transformation to overcome the problem of heterocedasticity? It is not usually useful to worry about this. In my experience, the gain in efficiency from using an essentially ideal weighted analysis vs. an approximate

Re: [R] read.spss and umlaut

2006-08-03 Thread Thomas Lumley
I have gone and looked at the code for reading SPSS portable files, and the file format appears to specify that you cannot read many legal characters. Part of the header information in the file format is a 256-byte translation table apparently designed for translating between character

[R] Help Building packages for windows

2006-08-03 Thread Denise Mauldin
Hello all, I've tried to build my linux source package with the following commands and then run it through the RCrossBuild package with R 2.3.1, but I get errors about how the built field is incorrect and that my Rd file has a non-empty \name. I've looked through the Rd file and it seems to

Re: [R] levels of an array (strings and numbers)

2006-08-03 Thread Uwe Ligges
Alessandro Antonucci wrote: Reading a csv file (db.csv) as: yes,full no,full no,empty I can use the command 'levels' to extract the different values appearing for each column as follows: d-read.csv(db.csv) levels(d[,2]) which returns [1] empty full while, doing the same

Re: [R] DOE in R

2006-08-03 Thread Spencer Graves
see in line Petr Pikal wrote: See ?aov ?lm something like lm(result~yourfactor1+yourfactor2+yourfactor3+yourfactor5, data=yourdataframe) or lm(result~(yourfactor1+yourfactor2+yourfactor3+yourfactor5)^2, data=yourdataframe) if you want all interactions. Make sure all yourfactors

Re: [R] Looking for transformation to overcome heterogeneity ofvariances

2006-08-03 Thread John Sorkin
Peter You question is difficult to answer without more information about the distribution of your residuals. Different residual patterns call for different transformations to stabilize the variance. One very common form of heterocedasticity is increasing variance with increasing values of an

Re: [R] read.spss 'error reading system-file header'

2006-08-03 Thread Finn Sandø
Thank you for your answer. I did try this but got similar errors. I tried all the other spss-specific formats with same result. A way to get access to the data is: save in sas-xport format (though all labels are lost) then save in another sas-format and asking spss to also save value labels

Re: [R] read.spss 'error reading system-file header'

2006-08-03 Thread Finn Sandø
Thank you Michael I think you point to the real cause of the problem. I solved my own immediate problem by using StatTransfer to transfer from sav to sav. My real concern is that the read.spss() function will become obsolete. Most of the data I have received in the last year have had those

[R] gsummary

2006-08-03 Thread Mike Saunders
Could someone give me a hand with the format of the gsummary function? Basically, I have a large set of xyz coordinates generated by LiDAR data (37 million points) and I am trying to derive various summary statistics on the z-coordinates by a grid cell. I wrote a function to do this by

[R] fitting a model with the nlme package

2006-08-03 Thread Frank Johannes
Dear all, I am analyzing some data that requires a mixed model. I have been reading Pinheiro and Bates' book, but cannot find the notation to fit the following model: Suppose I have the dataset below. Here I am fitting variable p as a fixed effect, variable h as a random effect and variable t as

Re: [R] gsummary

2006-08-03 Thread Douglas Bates
The gsummary function was intended to apply a summary function to each column in each of the groups of observations. The (implicit) definition of a summary function is that it produces a scalar from a vector. (See the groupings of functions in Table A.1, p. 472 of Statistical Models in S, a.k.a.

Re: [R] Looking for transformation to overcome heterogeneity ofvariances

2006-08-03 Thread Peter Dalgaard
[Resending -- recipient list length issue] John Sorkin [EMAIL PROTECTED] writes: Peter Erm, that was Paul's question, not mine! If you want to help, please look at the pattern of residuals which he put up on the web on my request You question is difficult to answer without more

[R] How to access a column by its label?

2006-08-03 Thread Neil McLeod
Hi all, Is there any way to access a column of a data frame by its label (title) rather than its column index? For example, I'd like to be able to select animals[,weight] rather than animals[,3], if the third column of the animals data frame has the label weight. Thank you!

Re: [R] read.spss 'error reading system-file header'

2006-08-03 Thread Thomas Lumley
On Thu, 3 Aug 2006, Finn Sand? wrote: My real concern is that the read.spss() function will become obsolete. Most of the data I have received in the last year have had those problems (and increasingly so), now they have become so serious that the import process fails all together. Therefore I

Re: [R] fitting a model with the nlme package

2006-08-03 Thread Douglas Bates
On 8/3/06, Frank Johannes [EMAIL PROTECTED] wrote: Dear all, I am analyzing some data that requires a mixed model. I have been reading Pinheiro and Bates' book, but cannot find the notation to fit the following model: Suppose I have the dataset below. Here I am fitting variable p as a fixed

Re: [R] How to access a column by its label?

2006-08-03 Thread vincent
?colnames hih __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] How to access a column by its label?

2006-08-03 Thread Marc Schwartz (via MN)
On Thu, 2006-08-03 at 14:44 -0400, Neil McLeod wrote: Hi all, Is there any way to access a column of a data frame by its label (title) rather than its column index? For example, I'd like to be able to select animals[,weight] rather than animals[,3], if the third column of the animals data

Re: [R] ggplot facet label font size

2006-08-03 Thread Walker, Sam
This works OK, but there is some extra spacing between the panels, the top axis and the strip on the top, and the left labels and panel. How can I remove these extra spaces? I've tried changing various layout.widths settings with no luck. It seems the spaces are calculated based on the number

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

2006-08-03 Thread Brian S Cade
Paul: It is too bad that most peoples statistical thought processes lead them to thinking heterogeneity is something to overcome so that a simple test of differences in means with ANOVA can be made. If you have that much heterogeneity among 96 groups (hard for me to imagine otherwise),

[R] meta characters in file path

2006-08-03 Thread Li,Qinghong,ST.LOUIS,Molecular Biology
Hi, I need to read in some files. The file names contain come meta characters such as @, #, and white spaces etc, In read.csv, file= option, is there any way that one can make the function to recognize a file path with those characters? Thanks Johnny [[alternative HTML version

Re: [R] meta characters in file path

2006-08-03 Thread Tony Plate
What is the problem you are having? Seems to work fine for me running under Windows2000: write.table(data.frame(a=1:3,b=4:6), file=@# x.csv, sep=,) read.csv(file=@# x.csv) a b 1 1 4 2 2 5 3 3 6 sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1]

Re: [R] fitting a model with the nlme package

2006-08-03 Thread Doran, Harold
(out - lmer(p ~ f - 1 + (1|h/t) + (1|j), set)) Doug: It seems the nesting syntax is handled a bit differently. Is (1|h/t) equivalent to the old lme nesting syntax? __ R-help@stat.math.ethz.ch mailing list

Re: [R] Weibull distribution

2006-08-03 Thread Göran Broström
On 7/21/06, Thomas Lumley [EMAIL PROTECTED] wrote: On Fri, 21 Jul 2006, Valentin Dimitrov wrote: Dear Leaf, I modified your code as follows: gamma.fun - function(mu,sd,start=100) { f.fn - function(alpha)

[R] geodesic distance (solved)

2006-08-03 Thread stefano iacus
I found the answer to my problem. stefano __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] ggplot facet label font size

2006-08-03 Thread hadley wickham
Hi Sam, How do I change the font size in the facet labels along the edges of the plot? Unfortunately, you can't currently change the size of those fonts. However, it is on my todo list (as well as completely custom strip functions) and should be available in the near future. One thing you

Re: [R] Finding the position of a variable in a data.frame

2006-08-03 Thread Don MacQueen
You don't need to find out the column index. This works: Df[5,'bat'] - 100 -Don At 5:01 PM -0400 8/2/06, John Kane wrote: Simple problem but I don't see the answer. I'm trying to clean up some data I have 120 columns in a data.frame. I have one value in a column named blaw that I want to

Re: [R] Tcltk package

2006-08-03 Thread John McHenry
Hi Adrian, Thanks for the tip. I re-installed and everything seems to work just fine. Thanks, Jack. Adrian DUSA [EMAIL PROTECTED] wrote: On Tuesday 01 August 2006 19:24, John McHenry wrote: [...] Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available is

Re: [R] Finding the position of a variable in a data.frame

2006-08-03 Thread John Kane
--- Don MacQueen [EMAIL PROTECTED] wrote: You don't need to find out the column index. This works: Df[5,'bat'] - 100 -Don Thanks, I'd tried Df[5, bat] - 100 :( I never thought of the ' ' being needed. At 5:01 PM -0400 8/2/06, John Kane wrote: Simple problem but I don't see

[R] Ambitious newbie with some ongoing Q's

2006-08-03 Thread Mitchell Maltenfort
I'm new to the list and I've been playing about with R for some months now, mostly using the power analysis routines including the pwr package. I'm currently looking at a project which will require a repeated-measures MANCOVA. I've been reviewing the files available at CRAN, including

Re: [R] Random structure of nested design in lme

2006-08-03 Thread Spencer Graves
I'm not familiar with 'aov', but I have two observations that might help you: 1. UNESTIMABLE VARIANCE COMPONENT The variance component 'soiltype' is not estimable in your 'lme' model: lme(NA.1~soiltype*habitat,random=~1|destination/soiltype) That's because each

Re: [R] Finding the position of a variable in a data.frame

2006-08-03 Thread Gabor Grothendieck
On 8/3/06, John Kane [EMAIL PROTECTED] wrote: --- Don MacQueen [EMAIL PROTECTED] wrote: You don't need to find out the column index. This works: Df[5,'bat'] - 100 -Don Thanks, I'd tried Df[5, bat] - 100 :( I never thought of the ' ' being needed. Right -- the quotes are

[R] Building a random walk vector

2006-08-03 Thread Matthew Wilson
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. In python, I would write: vec = [100] * 50 # make a 50-element list with each element set to 100 from random import randint for i, v in

[R] Questions about sweave...

2006-08-03 Thread Brian Lunergan
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 include the complete files involved as I'm just not

[R] gnlsControl

2006-08-03 Thread Daniel Coleman
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 gnlsControl does not contain minFactor nor nlsMinFactor

Re: [R] Building a random walk vector

2006-08-03 Thread Duncan Murdoch
On 8/3/2006 9:17 PM, Matthew Wilson wrote: 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. In python, I would write: vec = [100] * 50 # make a 50-element list with each element set to

Re: [R] Building a random walk vector

2006-08-03 Thread Dirk Eddelbuettel
On 4 August 2006 at 01:17, Matthew Wilson wrote: | 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. | | In python, I would write: | | vec = [100] * 50 # make a 50-element list with each

Re: [R] ggplot facet label font size

2006-08-03 Thread Gabor Grothendieck
If you are willing to use grid then you could create only the sex factor in the left strips since its already in the desired position but when displaying it output a factor.level, i.e. label of A. (my.strip.left is modified from the prior post to do that.) Then after the plot is drawn, looping

Re: [R] ggplot facet label font size

2006-08-03 Thread Gabor Grothendieck
Just sending this to you. One thing that might be easy to do yet give a lot of flexibility is to: 1. put meaningful names on the grobs. Even with just this it would be possible to do a getNames() in grid and then from inspection grid.edit the appropriate one(s). 2. create a routine that

  1   2   >