Re: [R] mode or parameters of readBin

2007-09-10 Thread Thomas Lumley
; > > returns for the mode of size logical. But in the documentation is said > that size should be integer. Does anyone know why the mode is logical? > Because NA is a logical constant. -thomas __ R-help@stat.math.ethz.ch mai

Re: [R] Survey package

2007-09-10 Thread Thomas Lumley
a design stratified by stratum and post-stratified by sex, which is not the same as stratifying by stratum*sex or post-stratifying by stratum*sex. In this case you should probably rake() on stratum and sex rather than just post-stratifying. Post-stratifying on sex is equivalent to one iterat

Re: [R] Are the error messages of ConstrOptim() consisten with each other?

2007-09-10 Thread Thomas Lumley
The error message about the feasible region comes from constrOptim(), before your function is called. The error message about missing lambda1 comes from calling your function. -thomas On Sun, 9 Sep 2007, Yuchen Luo wrote: > Dear Friends. > I found something very puzzlin

Re: [R] the survey package

2007-09-10 Thread Thomas Lumley
; > The following should work (untested): > > design <- svydesign(ids=~0, strata=~regiune + size_loc, data=tabel) This would be a two-stage sample, you actually need ~interaction(regiune, size_loc). [this reply is just to make sure it ends up linked in the archives]. -thomas __

Re: [R] Survey package

2007-09-10 Thread Thomas Lumley
el) Second, you have not specified either weights or population sizes, so R has no way to work out the sampling weights. That's why you get weights of 1. You should also get a warning. -thomas __ R-help@stat.math.ethz.ch mailing list

Re: [R] Rserve: Accessing images

2007-09-04 Thread Thomas Kaliwe
ages via Rserve than: >> >> Rconnection c=new Rconnection("127.0.0.1"); >> REXP xp=c.eval("try(png(\"test.png\"))") >> c.voidEval("plot(1:10)"); >> c.voidEval("dev.off()"); >> is = c.openFile("test.png");

Re: [R] How to measure mode (central tendancy)

2007-08-30 Thread Thomas Petzoldt
Julian Burgos wrote: > mode()... of course! Wrong. See ?mode "Get or set the type or storage mode of an object." Thomas P. > Raymond Balise wrote: >> What is the name of the function to give me the mode (central tendancy) of a >> numeric variable that can be negati

Re: [R] How to measure mode (central tendancy)

2007-08-30 Thread Thomas Petzoldt
elp/04/02/1409.html Thomas P. __ 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] Excel (off-topic, sort of)

2007-08-30 Thread Thomas Lumley
where you can change the confidence limits for the sample mean and have the data change in response. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-hel

Re: [R] oddity with method definition

2007-08-27 Thread Thomas Lumley
quot;foo", x= 1) > > bar(f) > > # bar(f) gives 0, not 1. > Because bar() isn't a generic function > bar function(object) { return(0) } If you had used setGeneric() before setMethod(), as recommended, your example would have done what you expec

Re: [R] Max vs summary inconsistency

2007-08-27 Thread Thomas Lumley
> typeof(m) > [1] "integer" >> class(m) > [1] "integer" > > ...it seems to me like max() and summary(m)[6] ought to return the same > number. Am I doing something wrong? > They do return the same number, they just print it differently. summary() print

Re: [R] subset using noncontiguous variables by name (not index)

2007-08-27 Thread Thomas Lumley
nd a search of r-help reveals two previous, different, suggestions for %:%. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https://stat

Re: [R] Saving results from Linux command line

2007-08-24 Thread Thomas Lumley
There could still be functions that divert a copy of all the output to a file, for example. And indeed there are. sink("transcript.txt", split=TRUE) -thomas On Fri, 24 Aug 2007, Muenchen, Robert A (Bob) wrote: > I looked long and hard for that information. Thank you VE

Re: [R] R "old versions" archive anywhere?

2007-08-23 Thread Thomas Lumley
Directories Archive Previous versions of the packages listed above. - linking to [CRAN]/src/contrib/Archive -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

Re: [R] All subsets regression

2007-08-22 Thread Thomas Lumley
On Wed, 22 Aug 2007, Alan Harrison wrote: > Hey folks, > > I'm trying to do all subsets on a zero-inflated poisson regression. > I'm aware of the leaps and regsubsets functions but I don't know if they > work for ZIP regressions or how the syntax fits in for them.

Re: [R] Question about lme and AR(1)

2007-08-19 Thread Thomas Lumley
al maximum) for any likelihood. The special case you may be thinking of is that in some problems the E-step is equivalent to computing E[missing data | observed data] rather than the more general E[loglikelihood|observed data] -thomas Thomas Lumley Assoc. Professor

Re: [R] Regulatory Compliance and Validation Issues

2007-08-19 Thread Thomas Lumley
WS file. The question of whether it is dangerous is really an internal risk management issue for you. -thomas __ 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] using sampling weights in glm

2007-08-15 Thread Thomas Lumley
sion on the data but > I am not clear about if or better how I can use the > weights in it. From the description of the weights > argument of glm it seems to me that I cannot plug > these weights in there. > You want svyglm() in the survey package. -thomas Thomas Lu

Re: [R] simulate data from multivariate normal with pre-specified correlation matrix

2007-08-14 Thread Thomas Harte
# here's your example correlation matrix: sigma<- matrix(c(1.00, 0.75, 0, 0.75, 1.00, 0, 0.00, 0.00, 0), nr=3, byrow=TRUE) chol(sigma) # Error in chol(sigma) : the leading minor of order 3 is not positive definite # DUH! # let's chop off that dangling row and col

Re: [R] Regsubsets statistics

2007-08-09 Thread Thomas Lumley
bles, you can fit a model with all variables and then apply regsubsets() to the weighted linear model arising from the IWLS algorithm. This will give an approximate ranking of models that you can then refit exactly. This is useful if you wanted to summarize the best few thousand models on 30 v

Re: [R] small sample techniques

2007-08-08 Thread Thomas Lumley
ssumes equal variances (the original one), so you need var.equal=TRUE. -thomas > -Original Message- > From: Moshe Olshansky [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 07, 2007 9:05 PM > To: Nair, Murlidharan T; r-help@stat.math.ethz.ch > Subject: Re: [R] sma

Re: [R] Mixture of Normals with Large Data

2007-08-08 Thread Thomas Lumley
of the mixture components drift around over time. The location, scale, and mass of the four mixture components really were the best summaries. This was the application that constrOptim() was written for. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTE

[R] Creating netcdf from table

2007-08-08 Thread Thomas Szegvary
p (put.var.ncdf) doesn't work, because it says I am trying to "error: you asked to write 111788329 values, but the passed data array only has 10573 entries!". So I think the problem is I need an array with two dimensions (coordinates...) for my values. But do I get this from my tables??

Re: [R] Robust Standard Errors for lme object

2007-08-07 Thread Thomas Lumley
sumably correct if you have your model correctly specified. To paraphrase the Hitchikers' Guide: This must be some definition of the word 'robust' that I was not previously aware of. :) -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMA

[R] [R-pkgs] surveyNG (and survey)

2007-08-04 Thread Thomas Lumley
005 and verison 3.6-11 was recently posted. It provides fairly comprehensive facilities for analysis of complex survey designs. Major additions since 2.9 are calibration estimators (aka GREG or generalized raking), simple two-phase designs, and smoothing. -thomas Thomas Lumley

Re: [R] Q: calling par() in .First()

2007-08-02 Thread Thomas Lumley
graphics::par(bg='white') Information from which this can be deduced and examples are in ?Startup, though it isn't explicitly stated there. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] - round() strange behaviour

2007-08-02 Thread Thomas Lumley
On Thu, 2 Aug 2007, Monica Pisica wrote: > > Hi, > > I am getting some strange results using round - it seems that it depends if > the number before the decimal point is odd or even Yes. This is explained in the help page for round(). -thomas Thomas Lumley

Re: [R] Nonlinear optimization with constraints

2007-08-02 Thread Thomas Lumley
ke a linear inequality to me. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] constrOptim

2007-08-02 Thread Thomas Lumley
no need to constrain them to be <=1, as this is implied by the first constraint. It might be interesting to find out if some automated Lagrange-multiplier approach could be built into constrOptim() for equality constraints, but it is not a high enough priority that I am likely to do it.

Re: [R] aggregate.data.frame - prevent conversion to factors? show statistics for NA values of "by" variable?

2007-08-02 Thread Thomas Pujol
r(mydata, exclude=NULL) str(myfactor.try1) str(myfactor.try2) Prof Brian Ripley <[EMAIL PROTECTED]> wrote: The behaviour has been changed in the R-devel version of R, so the 'by' columns are not converted to factors. On Tue, 31 Jul 2007, Thomas Pujol wrote: > I have a two que

[R] aggregate.data.frame - prevent conversion to factors? show statistics for NA values of "by" variable?

2007-07-31 Thread Thomas Pujol
I have a two question regarding the "aggregate.data.frame" method of the "aggregate" function. My situation: a. My "x" variable is a data.frame ("mydf") with two columns, both columns of type/format "numeric". b. My "by" variable is a data.frame("mybys") with two columns, both columns of type

[R] how to install rattle() with R-GUI2.5.1 ?

2007-07-30 Thread j.joshua thomas
i am using R-Gui2.5.1 where can i find rattle() ? previous version of R-Gui2.4.1 with rattle() works fine i tried with the new version and i could not locate the rattle() i follow the steps 1.install R-Gui-2.5.1 2. install gtk-2.10.7-win32-1 3. install gtk-dev-2.10.7-win32-1 4. install ggobi-

[R] how to install rattle() in R-GUI2.5.1

2007-07-30 Thread j.joshua thomas
Dear Group, I have installed R-GUI 2.5.1, thereby i tried install >install.packages("RGtk2") >install.packages ("rattle") where i have problems such as below: > install.packages("RGtk2") Warning: unable to access index for repository http://cran.au.r-project.org/bin/windows/contrib/2.5 Warning

[R] error in using R2WinBUGS on Ubuntu 6.10 Linux

2007-07-30 Thread Thomas Harte
what version of Wine are you running? and is this the patched (1.4.1) version of WinBUGS that you're trying to run? cheers, thomas. > Date: Thu, 26 Jul 2007 12:03:38 -0400 (EDT) > From: <[EMAIL PROTECTED]> > Subject: [R] error in using R2WinBUGS on Ubuntu 6.10

Re: [R] reading stata files: preserving values of variables converted to factors

2007-07-30 Thread Thomas Lumley
but seems to discard the labels. It doesn't discard the labels. They are kept in the attributes of the data frame. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] Minitab Parametric Distribution Analysis in R

2007-07-25 Thread Thomas Lumley
our R distribution. -thomas On Wed, 25 Jul 2007, Tom La Bone wrote: > Minitab can perform a "Parametric Distribution Analysis - Arbitrary > Censoring" with one of eight distributions (e.g., weibull), giving the > maximum likelihood estimates of the parameters in the di

Re: [R] (no subject)

2007-07-23 Thread Thomas Lumley
It's a FAQ (Question 7.32) -thomas On Mon, 23 Jul 2007, [EMAIL PROTECTED] wrote: > > Dear Sir/Madam, > > I am running a R program for my SNP data. There are some errors when I run > glm model in Hapassoc software, sometimes it is over the memory and > sometimes

Re: [R] GEE code

2007-07-20 Thread Thomas Lumley
ed, but for a linear or log-linear model it is just a matter of adding predictors. Now, I might well use a linear mixed model in this context, but he did fairly clearly indicate that wasn't he was looking for. -thomas Thomas Lumley Assoc. Professor, Biostatisti

Re: [R] Sweave on mac os x

2007-07-19 Thread Thomas Adams
th.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. > -- Thomas E Adams National Weather Service Ohio River Forecast Cent

Re: [R] R

2007-07-19 Thread Thomas Lumley
survey literature seems to be Binder, David A. (1983). On the variances of asymptotically normal estimators from complex surveys. International Statistical Review, 51, 279-292. which is in the References section of help(svyrecvar). -thomas ___

[R] sqlSave, ...colnames=F, using "odbcConnectExcel" .... I still get colnames in top row of exprted sheet

2007-07-18 Thread Thomas Pujol
I am trying to save an R data.frame as an Excel sheet. I do NOT want the column names saved into row 1. I set colnames=F. However, it still seems that the colnames are saved into row 1. Is this a bug? Or am I coding incorrectly and.or misunderstanding this feature? #example code: sheet = "c:/test

Re: [R] can I run/launch an excel VBA macro from wihin R?

2007-07-18 Thread Thomas Pujol
FYI, Here is a tip that Gabor Grothendieck sent to the r-com help-list. Thought others might find it helpful. http://mailman.csd.univie.ac.at/pipermail/rcom-l/2007-July/001717.html Subject: Re: [Rcom-l] running Excel/Visual Basic macro from within R[input] [input] [input] [inpu

[R] can I run/launch an excel VBA macro from wihin R?

2007-07-15 Thread Thomas Pujol
Is there an "easy" or good way to run/launch an Excel VBA macro from within R? - Pinpoint customers who are looking for what you sell. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mail

Re: [R] Complex surveys, properly computed SEs and non-parametric analyses

2007-07-15 Thread Thomas Lumley
On Sun, 15 Jul 2007, Tobias Verbeke wrote: > The survey package of Thomas Lumley has very broad functionality for the > analysis of data from complex sampling designs. Please find below the > homepage of the package (which is available on CRAN): > > http://faculty.washington.edu

[R] Send SMS out of R?

2007-07-14 Thread Thomas Schwander
mobile phone number? Thank you Thomas [[alternative HTML version deleted]] __ 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

Re: [R] Help with write.foreign (exporting data to Stata)

2007-07-10 Thread Thomas Lumley
en have been deleted on leaving R. This is only a guess, of course. The syntax for write.dta is write.dta(the.data.set, file="dataset.dta") and for write.foreign is write.foreign(the.data.set,codefile="dataset.do", datafile="dataset.raw", package="

Re: [R] calculating p-values of columns in a dataframe

2007-07-09 Thread Thomas Pujol
,2,function(x) if(fn.count(x)==0) NA else t.test(x)$statistic) } myfn.p.val <- function(df) { apply(df,2,function(x) if(fn.count(x)==0) NA else t.test(x)$p.value) } Uwe Ligges <[EMAIL PROTECTED]> wrote: Thomas Pujol wrote: > I have a dataframe ("mydf") that conta

Re: [R] character string to name

2007-07-09 Thread Thomas Lumley
On Mon, 9 Jul 2007, Jim Lemon wrote: > Hi folks, > > I thought I recalled a request for turning a character string into an > object name as in: Yes. It's a FAQ. -thomas > x$as.name("y")<-1:4 > > OR > > x<-data.frame(as.name("y&q

[R] calculating p-values of columns in a dataframe

2007-07-07 Thread Thomas Pujol
I have a dataframe ("mydf") that contains "differences of means". I wish to test whether these differences are significantly different from zero. Below, I calculate the t-statistic for each column. What is a "good" method to calculate/look-up the p-value for each column? mydf=data.frame(a=c(1,-

Re: [R] Is it a bug ?

2007-07-05 Thread Thomas Lumley
4.86768038.25129560.611092 > 98.967689 166.572985 289.08 517.425935 > [55] 955.487320 1820.793570 3581.521323 7273.674928 15255.446778 > 33050.861013 73982.100407 >> > > Is it strange or did I miss something ? You missed something. It is not clear what

Re: [R] How to install R 2.5 with Synaptic in Ubuntu?

2007-07-04 Thread Thomas Harte
-base-latex r-base-dev r-gnome recently to update to R 2.5.1 on my version of Ubuntu (6.06). cheers, thomas. > Message: 98 > Date: Wed, 4 Jul 2007 02:34:37 -0700 (PDT) > From: msmith <[EMAIL PROTECTED]> > Subject: Re: [R] How to install R 2.5 with Synaptic in Ub

Re: [R] Determining whether a function's return value is assigned

2007-07-02 Thread Thomas Lumley
en one might use it like > this > >myfunction <- function () { ># Create bigobject here > >if (return.value.assigned()) { >bigobject >} else { >summary(bigobject) >} >} That's wh

[R] speed issues / pros & cons: dataframe vs. matrix

2007-06-22 Thread Thomas Pujol
I've read that certain operations performed on a matrix (e.g. ribind, cbind) are often much faster compared to operations performed on a data frame. Other then the "bind functions", what are the main operations that are significantly faster on a a matrix? I know that data frames allow for colum

Re: [R] extract index during execution of sapply

2007-06-22 Thread Thomas Lumley
suggests having yet another apply function, that would assume an INDEX argument and might be written yapply<-function(X,FUN, ...) { index<-seq(length.out=length(X)) mapply(FUN,X,INDEX=index,MoreArgs=list(...)) } However, I think it would be preferable in many cases

[R] what is "better" when combining data frames? merge vs. rbind & cbind

2007-06-22 Thread Thomas Pujol
I often need to "combine" data frames, sometimes "vertically" and other times "horizontally". When it "better" to use merge? When is it better to use rbind or cbind? Are there clear pros and cons of each approach? - [[alternative HTML version del

[R] anova on data means

2007-06-21 Thread Thomas Miller
I am transitioning from SAS to R and am struggling with a relatively simple analysis. Have tried Venables and Ripley and other guides but can't find a solution. I have an experiment with 12 tanks. Each tank holds 10 fish. The 12 tanks have randomly assigned one of 4 food treatments - S(tarve),

Re: [R] model selection criteria in "regsubsets"

2007-06-21 Thread Thomas Lumley
The calculations are in summary.regsubsets. Sending three copies of questions like this does not increase the chance of a response. -thomas On Thu, 21 Jun 2007, [EMAIL PROTECTED] wrote: > Hi All, > > I used "regsubsets" in package "leaps" to do th

[R] shoudl I use apply, sapply, etc instead of a "for loop"?

2007-06-20 Thread Thomas Pujol
I have been trying to learn the various "apply" functions but am still learning their appropriate use. I appreciate any help the R community can offer me. Sorry for the length of this post. Background: I have data on my hard drive organized in the following manner: The data pertains to many

Re: [R] Error handling

2007-06-19 Thread Thomas Lumley
This is FAQ 7.32 How can I capture or ignore errors in a long simulation? -thomas On Tue, 19 Jun 2007, Peter Sajosi wrote: > Hello, > > I have a question about error handling. I run simulation studies and often > the program stops with an error, for example during maximu

Re: [R] BIC and Hosmer-Lemeshow statistic for logistic regression

2007-06-19 Thread Thomas Lumley
On Tue, 19 Jun 2007, spime wrote: > > Is there any windows version of Design package??? > Not at the moment. It is being updated for changes in R 2.5.0. [This would be a FAQ except that it should stop being asked soon] -thomas > > > > > > Frank E Harrell

Re: [R] psm/survreg coefficient values ?

2007-06-19 Thread Thomas Lumley
, of course, for a discrete predictor of heterogeneity, using strata(). -thomas > On Monday 18 June 2007 22:56:54 Frank E Harrell Jr wrote: >> sj wrote: >>> I am using psm to model some parametric survival data, the data is for >>> length of stay in an emerge

[R] merging dataframes with diffent rownumbers

2007-06-18 Thread Thomas Hoffmann
to dat2 with BNUM as index. I would like to add the columns from dat1 to the results of b.sum <- tapply(dat2, BNUM, sum). However the BNUM of b.sum are only a subset of the dat1. Does anybody knows a elegant way to solve the problem? Thanks in advance Thoma

Re: [R] importing .dta files

2007-06-15 Thread Thomas Lumley
tood some unusual possibility in the Stata file format -- this has happened once before -- but it is fairly well documented. In any case, there is not much that can be done without more information. -thomas __ R-help@stat.math.ethz.ch

Re: [R] question about formula for lm

2007-06-14 Thread Thomas Petzoldt
Why not using: lm(X[[Ytext]]~Xvar,data=X) ThPe Pedro Mardones wrote: > Dear all; > > Is there any way to make this to work?: > > .x<-rnorm(50,10,3) > .y<-.x+rnorm(50,0,1) > > X<-data.frame(.x,.y) > colnames(X)<-c("Xvar","Yvar") > > Ytext<-"Yvar" > > lm(Ytext~Xvar,data=X) # doesn't run >

Re: [R] Using odesolve to produce non-negative solutions

2007-06-14 Thread Thomas Petzoldt
in the optimization procedure. Thomas PS: another question, what is the purpose of the state variable N? I guess it can be derived from the other states. Jeremy Goldhaber-Fiebert wrote: > Hello, > > I am using odesolve to simulate a group of people moving through time > and transm

Re: [R] export to a dat file that SAS can read

2007-06-13 Thread Thomas Lumley
t; >> and which functions to use for that? > > I *guess* write.table() will do the trick, given "dat" is what I guess > it is... Another approach (that preserves factor levels if you have them) is to use write.foreign in the 'foreign' package. This wr

Re: [R] Looking for R-code for non-negative matrix factorization in the presence of Gaussian or Poisson noise

2007-06-11 Thread Thomas Lumley
od [at least, I don't understand them, and I have simulations that appear to contradict the views of people who claim to understand them]. The difficulty probably depends on the size of the problem -- the air pollution problems have n~1000, p~20, nc~7, or larger. -thomas _

Re: [R] name of the variable that will contain the result of a function

2007-06-06 Thread Thomas Lumley
worse that this, for example, x[[7]][y][[4]] <- foo(arg1) w <- foo(arg2)+1 names(x)[foo(arg3)] <- foo(arg4) -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Beginners Question

2007-06-03 Thread Thomas Zastrow
are the same is *not* what the message says. > > You can't just look at elements of the results of dist() and simply > relate them back to object numbers. Try as.matrix(x.dist) for a > human-readable form. > > > On Fri, 1 Jun 2007, Thomas Zastrow wrote: > >> Dea

[R] Beginners Question

2007-06-01 Thread Thomas Zastrow
Dear all, I'm completely new to R and at first I must say that it is a great program! But I have a problem with the function isoMDS from the MASS package. I have this code which I load with source() from a file: x <- c(163.59514923926784, 150.01448475257115, .. {here are some more values})

Re: [R] summing up colum values for unique IDs when multiple ID's exist in data frame

2007-05-29 Thread Thomas Lumley
ids. >> >> I hope there are some cheaper ways of doing it... Because the >> dataframe is huge, it takes almost an hour to do the task. Thanks >> so much in advance! > > Does this do what you want in a faster way? > rowsum() should probably be faster (but pe

Re: [R] normality tests [Broadcast]

2007-05-28 Thread Thomas Lumley
. > >LuckeJF> Testing for normality prior to choosing a test >LuckeJF> statistic is generally not a good idea. > > Definitely. Or even: It's a very bad idea ... > I think that's something we can all agree on. -thomas

Re: [R] saving datafreame object problem

2007-05-22 Thread Thomas Lumley
; save(dtaa,"dtaa",file="c:/dtaa") > > d = load("c:/dtaa") > >From ?load Value: A character vector of the names of objects created, invisibly. So d is correct. Try ls() to find the loaded data. -thomas _

Re: [R] svychisq

2007-05-22 Thread Thomas Lumley
doesn't have an na.rm argument. Does the same thing happen if you call svychisq() directly rather than via summary(svytable())? -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle ___

Re: [R] convergence of coxfilter and coxph

2007-05-22 Thread Thomas Lumley
oxph doesn't converge with the same matrix? coxfilter() fits 8000 one-variable models, which works (for appropriate values of "works"). coxph() refuses to fit one 8000-variable model. -thomas __ R-help@stat.math.ethz.ch mailing list h

Re: [R] Selecting complementary colours

2007-05-22 Thread Thomas Lumley
<-function (color) { rgb <- col2rgb(color)/255 L <- c(0.2, 0.6, 0) %*% rgb ifelse(L >= 0.2, "#60", "#A0") } This uses a pale yellow for dark backgrounds and a dark blue for light backgrounds, and it seems to work reasonably well.

[R] comparing fit of cubic spline

2007-05-21 Thread Thomas Reed
I want to compare the fit of a quadratic model to continuous data, with that of a cubic spline fit. Is there a way of computing AIC from for e.g. a GAM with a smoothing spine, and comparing this to AIC from a quadratic model? Cheers ** Tom Reed PhD S

Re: [R] Running an R script without running R

2007-05-21 Thread Thomas Adams
lman/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. > -- Thomas E Adams National Weather Service Ohio River Forecast Center 1901 South State Route 134 Wilmington,

Re: [R] lapply not reading arguments from the correct environment

2007-05-18 Thread Thomas Lumley
oCollumn is not visible. You could do lapply(foos, function(foo) subset(foo, select=fooCollum)) capturing fooCollum by lexical scope. In R this is often a better option than passing extra arguments to lapply (or other functions that take function arguments). -thomas __

Re: [R] Scoped options setting?

2007-05-17 Thread Thomas Lumley
e does in Lisp. I naively tried > You could write with_options() as with_options <-function(optionlist, expr){ oldoptions<-options(optionlist) on.exit(options(oldoptions)) eval(substitute(expr), parent.frame()) } and then do with_options(l

Re: [R] Re-sizing R graphics for Sweave

2007-05-16 Thread Thomas Adams
Marc, That did it! Thank you so much for your help… Regards, Tom Marc Schwartz wrote: > On Wed, 2007-05-16 at 16:34 -0400, Thomas Adams wrote: > >> I am generating a single graphic containing about 31 Boxplots; the issue >> I am having is that not all the labels (3 ch

[R] Re-sizing R graphics for Sweave

2007-05-16 Thread Thomas Adams
rched and can not find a way to do this automatically — I could not find anything in the "R Graphics" book by Paul Murrell that pointed me in the right direction either. Thank you, Tom -- Thomas E Adams National Weather Service Ohio River Forecast Center 1901 South State Route 134

Re: [R] Problem with Sweave

2007-05-15 Thread Thomas Adams
Duncan, Thank you for your help — that certainly did the trick. With Sweave being new to me, I somehow missed the obvious… Regards, Tom Duncan Murdoch wrote: > On 15/05/2007 9:22 PM, Thomas Adams wrote: >> I am using R 2.5 on a Linux Redhat platform. I can successfully run >&g

[R] Problem with Sweave

2007-05-15 Thread Thomas Adams
I am using R 2.5 on a Linux Redhat platform. I can successfully run some example *.Rnw files through Sweave and generate pdf files. When I try my own example file, "test.Rnw": \documentclass[a4paper]{article} \title{Test Sweave Example} \author{Thomas Adams} \begin{document} \maketit

Re: [R] PRESS criterion in leaps

2007-05-14 Thread Thomas Lumley
explicitly, the columns of Q from the QR factorization would suffice. > Not only is the hat matrix never calculated explicitly, the Q matrix isn't calculated either. The code forms R and Q^TY directly (the same code is used in the biglm package to provide bounded-

Re: [R] [OT] Is data copyrightable?

2007-05-14 Thread Thomas Lumley
ution. So, in the US, it depends on the data and their source. Publishers that I have talked to tend to claim that data are definitely copyrightable, but since they tend to own the copyrights one might do well to recall the immortal words of Mandy Rice-Davies. -thomas Tho

Re: [R] power 2x3 exact test

2007-05-10 Thread Thomas Lumley
gestion for this. r2dtable(). If this is a power calculation, though, you probably want to fix only one margin, which is a much simpler problem, and if the table is not too large it would not be difficult to compute the exact probability for each element of the sample space and so get

Re: [R] Mantel-Haenszel relative risk with Greenland-Robins variance estimate

2007-05-10 Thread Thomas Lumley
error. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

Re: [R] listing R packages in our system

2007-05-04 Thread Thomas Adams
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. > -- Thomas E Adams National Weather Service Ohio River Forecast

Re: [R] reference in article

2007-05-02 Thread Thomas Lumley
on()' on how to cite R or R packages in publications. -thomas __ 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 co

Re: [R] impossible to open SPSS file

2007-05-01 Thread Frank Thomas
possible to > Excel) and import it to R > SPSS does not externalize the data format :-( > Regards Knut > We don't have SPSS so unfortunately this work around is not possible. Thank you both, Frank -- .. Dr. Frank Thomas FTR Internet R

[R] impossible to open SPSS file

2007-04-29 Thread Frank Thomas
eur dans read.spss("C:RdataESS1_ICT.SAV") : impossible d'ouvrir le fichier I guess the error is evident for everyone else, but I don't see it. Thanks Frank Thomas -- ...... Dr. Frank Thomas FTR Internet

[R] normalizing affy data caused an error

2007-04-28 Thread Thomas Funke
Hi all, I tried to do normalization of affymetrix data with bioconductor on a Linux server. When I read in the cel files all seemed ok. But the next step caused an error. With Win XP all works fine. Did anyone experience similar problems? Thanks, Thomas > PI <- ReadAffy(

Re: [R] GLS terminology question not related to R

2007-04-25 Thread Thomas Lumley
sue is whether the estimated variance of an OLS estimator is greater or less than the true variance of the OLS estimator. This can go either way. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] general question about plotting multiple regression results

2007-04-19 Thread Thomas Lumley
out interaction terms). The "effects" package does it better for linear regression models. -thomas > Here is an example illustrating my problem > > 1.I do a linear regression as follows > > summary(lm(n.day13~n.day1+ffemale.yell+fmale.yell+fmale.chroma,data=surv)

Re: [R] help comparing two median with R

2007-04-17 Thread Thomas Lumley
On Tue, 17 Apr 2007, Frank E Harrell Jr wrote: > The points that Thomas and Brian have made are certainly correct, if one is > truly interested in testing for differences in medians or means. But the > Wilcoxon test provides a valid test of x > y more generally. The test is >

Re: [R] help comparing two median with R

2007-04-17 Thread Thomas Lumley
her's exact test on the table. This is almost never useful (because it doesn't come with an interval estimate), but is interesting because it (and the generalizations to other quantiles) is the only exactly distribution-free location test that does not have the 'non-transiti

Re: [R] software comparison

2007-04-16 Thread Thomas Lumley
ing,... not 1.9.1? No -- there is a new x.y.0 twice per year. Checking the r-announce archives shows that 2.0.0 came out in October 2004 and 1.9.1 in June 2004. Describing 1.9.1 as "the latest version" was inaccurate, but it may well have been a more recent version than for most of the

[R] Getting and using a function

2007-04-13 Thread Thomas L Jones
I am trying to do what is perhaps the most basic procedure which can be done with the R software. Under Windows XP Home Edition, I want to get a copy of the function "gam," then put it in and use it. I intentionaly use informal terms, rather than technical terms whose exact meaning I might or m

Re: [R] Reasons to Use R

2007-04-11 Thread Thomas Lumley
;s Law will settle some issues, but there are problems where it is working to increase the size of datasets just as fast as it increases computational power. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washing

  1   2   3   4   5   6   7   8   9   10   >