Re: [R] Survey package

2007-09-10 Thread Thomas Lumley
On Thu, 6 Sep 2007, eugen pircalabelu wrote: Good afternoon! I'm trying to use the Survey package for a stratified sample which has 4 criteria on which the stratification is based. I would like to get the corrected weights and for every element i get a weight of 1 E.g: tipping

Re: [R] the survey package

2007-09-10 Thread Thomas Lumley
On Thu, 6 Sep 2007, Tobias Verbeke wrote: eugen pircalabelu wrote: I'm trying to use the survey package to get a better point of view for my data, but i need some piece of advice: i have some data from a survey which has been stratified using 2 criteria: region(7 values), size of

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

2007-09-10 Thread Thomas Lumley
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch

Re: [R] Survey package

2007-09-10 Thread Thomas Lumley
On Sun, 9 Sep 2007, eugen pircalabelu wrote: A short example: stratum id weight nh Nh y sex 1 1 3 5 15 23 1 1 2 3 5 15 25 1 1 3 3 5 15 27 2 1 4 3 5 15 21 2 1 5 3 5 15 22 1 2 6

Re: [R] mode or parameters of readBin

2007-09-10 Thread Thomas Lumley
On Mon, 10 Sep 2007, Sigbert Klinke wrote: Hi, sapply(formals(readBin), mode) con what n sizesignedendian namename numeric logical logicalcall returns for the mode of size logical. But in the documentation is said that size should be integer. Does

Re: [R] Excel (off-topic, sort of)

2007-08-30 Thread Thomas Lumley
in response. -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

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

2007-08-27 Thread Thomas Lumley
in X1--Y2, but in R it needs another argument specifying the data frame, so it can't really be a binary operator. The double colon :: and triple colon ::: are already used for namespaces, and a search of r-help reveals two previous, different, suggestions for %:%. -thomas Thomas

Re: [R] Max vs summary inconsistency

2007-08-27 Thread Thomas Lumley
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() prints four significant digits by default. -thomas Thomas Lumley Assoc. Professor, Biostatistics

Re: [R] oddity with method definition

2007-08-27 Thread Thomas Lumley
wiped out any previous methods for bar() -- eg, try setMethod(bar,baz, function(object) print(baz)) before you redefine bar(), and notice that getMethod(bar,baz) no longer finds it. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University

Re: [R] Saving results from Linux command line

2007-08-24 Thread Thomas Lumley
. __ 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. Thomas Lumley

Re: [R] R old versions archive anywhere?

2007-08-23 Thread Thomas Lumley
On Thu, 23 Aug 2007, [EMAIL PROTECTED] wrote: Hi Folks, Does anyone know if (apparently not on CRAN) there is any archive of older versions of R packages? Yes. On CRAN. At the bottom of the page listing all the packages there is a section - Related Directories Archive

Re: [R] All subsets regression

2007-08-22 Thread Thomas Lumley
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 guide http://www.R

Re: [R] Regulatory Compliance and Validation Issues

2007-08-19 Thread Thomas Lumley
On Fri, 17 Aug 2007, Cody Hamilton wrote: snip I have a few specific comments/questions that I would like to present to the R help list. snip 2. While the document's scope is limited to base R plus recommended packages, I believe most companies will need access to functionalities provided

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

2007-08-19 Thread Thomas Lumley
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, Biostatistics [EMAIL

Re: [R] using sampling weights in glm

2007-08-15 Thread Thomas Lumley
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 Lumley Assoc. Professor, Biostatistics [EMAIL

Re: [R] Regsubsets statistics

2007-08-09 Thread Thomas Lumley
. This is useful if you wanted to summarize the best few thousand models on 30 variables but not if you want a single model. On the other hand, regsubsets() isn't useful if you want a single model anyway. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED

Re: [R] Mixture of Normals with Large Data

2007-08-08 Thread Thomas Lumley
for. -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 guide

Re: [R] small sample techniques

2007-08-08 Thread Thomas Lumley
-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Robust Standard Errors for lme object

2007-08-07 Thread Thomas Lumley
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 [EMAIL PROTECTED] University of Washington, Seattle

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

2007-08-04 Thread Thomas Lumley
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 Assoc. Professor

Re: [R] constrOptim

2007-08-02 Thread Thomas Lumley
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. -thomas Thomas Lumley

Re: [R] Nonlinear optimization with constraints

2007-08-02 Thread Thomas Lumley
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 guide http://www.R

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 Assoc

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

2007-08-02 Thread Thomas Lumley
not understanding this time? par() is in the 'graphics' package, which is not loaded by the time .Rprofile runs. You want 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

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

2007-07-30 Thread Thomas Lumley
On Thu, 26 Jul 2007, Ben Saylor wrote: Hi, I am a Stata user new to R. I am using read.dta to read a Stata file that has variables with value labels. read.dta converts them to factors, but seems to recode them with values from 1 to number of factor levels (looking at the output of

Re: [R] Minitab Parametric Distribution Analysis in R

2007-07-25 Thread Thomas Lumley
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] (no subject)

2007-07-23 Thread Thomas Lumley
, reproducible code. 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

Re: [R] GEE code

2007-07-20 Thread Thomas Lumley
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, Biostatistics [EMAIL PROTECTED] University

Re: [R] R

2007-07-19 Thread Thomas Lumley
On Thu, 19 Jul 2007, Fluss wrote: Hello! I am using for logistic regression in survey data the svyglm procedure. I wondered how does the strata effect estimates SE (in addition to the weights given proportional to population size). I know that for simple regression measurements of each strata

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/tlumley/survey/ I

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

2007-07-10 Thread Thomas Lumley
/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 Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] character string to name

2007-07-09 Thread Thomas Lumley
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 Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University

Re: [R] Is it a bug ?

2007-07-05 Thread Thomas Lumley
On Thu, 5 Jul 2007, Giuseppe PEDRAZZI wrote: I am using R 2.5.0, windows XP - italian language. I was perfoming some calculation on fractional exponential and I found a strange behaviour. I do not know if it is really a bug, but I would expect a different answer from R. I was trying the

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

2007-07-02 Thread Thomas Lumley
On Sat, 30 Jun 2007, Paul Laub wrote: Dear all, Does R offer a means by which a function can determine whether its return value is assigned? I am using R 2.4.1 for Windows. No Suppose what I am looking for is called return.value.assigned. Then one might use it like this myfunction

Re: [R] extract index during execution of sapply

2007-06-22 Thread Thomas Lumley
On Fri, 22 Jun 2007, Ben Bolker wrote: Christian Bieli christian.bieli at unibas.ch writes: Hi there During execution of sapply I want to extract the number of times the function given to supply has been executed. I came up with: mylist - list(a=3,b=6,c=9)

Re: [R] model selection criteria in regsubsets

2007-06-21 Thread Thomas Lumley
the bic and cp criterias are both included in this function. But seems like they are not calculated by bic=-n*log(RSS/n)-(p+1)*log(n) and cp=(RSS/sigma_hat^2)-(n-2*p-2) Could you please let me know what formula used for these two criterias? Thank you ! Linda Thomas Lumley

Re: [R] psm/survreg coefficient values ?

2007-06-19 Thread Thomas Lumley
-contained, reproducible code. 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

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

2007-06-19 Thread Thomas Lumley
. __ 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. Thomas Lumley Assoc. Professor

Re: [R] Error handling

2007-06-19 Thread Thomas Lumley
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] importing .dta files

2007-06-15 Thread Thomas Lumley
On Fri, 15 Jun 2007, Chris Linton wrote: I'm trying to read in a Stata file but I've never used this function ( read.dta). It's the only one that seems to come close to working, but I keep getting this error: data-read.dta(C:/Documents and Settings/Chris/Desktop/S4412/catestscores.dta)

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

2007-06-13 Thread Thomas Lumley
On Wed, 13 Jun 2007, Uwe Ligges wrote: Rina Miehs wrote: Hello i have a data frame in R that some SAS users need to use in their programs, and they want it in a dat file, is that possible? What is a dat file? and which functions to use for that? I *guess* write.table() will do the

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
On Mon, 11 Jun 2007, [EMAIL PROTECTED] wrote: Hi all, Has any of you implemented code for non-negative matrix factorization to solve Y=T P' +E; dim(Y)=n,p ; dim(T)=n,nc; dim (P)=(p,nc); dim(E)=n,p where T and P must be non-negative and E either Gaussian or Poisson noise. I'm looking

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

2007-06-06 Thread Thomas Lumley
On Wed, 6 Jun 2007, Benilton Carvalho wrote: Hi everyone, say I have a function called 'foo', which takes the argument arg1. Is there any mechanism that I can use to learn about the variable where foo(arg1) is going to be stored? No. This information isn't available explicitly even at the

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

2007-05-29 Thread Thomas Lumley
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 perhaps not much). -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL

Re: [R] normality tests [Broadcast]

2007-05-28 Thread Thomas Lumley
On Mon, 28 May 2007, Martin Maechler wrote: LuckeJF == Lucke, Joseph F [EMAIL PROTECTED] on Fri, 25 May 2007 12:29:49 -0500 writes: LuckeJF Most standard tests, such as t-tests and ANOVA, LuckeJF are fairly resistant to non-normalilty for LuckeJF significance testing. It's the

Re: [R] convergence of coxfilter and coxph

2007-05-22 Thread Thomas Lumley
On Mon, 21 May 2007, carol white wrote: Hi, coxfilter function in genefilter package uses coxph to fit a model to filter genes. how come that coxfilter could converge to find a solution in cox model fitting using a data matrix of 8000 variables and 600 samples but coxph doesn't converge

Re: [R] Selecting complementary colours

2007-05-22 Thread Thomas Lumley
On Mon, 21 May 2007, John Fox wrote: In retrospect, I didn't specify the problem clearly: What I want to be able to do is to place text on a background of arbitrary (but known RGB) colour so that the text is legible. I guess that this is better described as a contrasting than a complementary

Re: [R] svychisq

2007-05-22 Thread Thomas Lumley
svychisq() directly rather than via summary(svytable())? -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] saving datafreame object problem

2007-05-22 Thread Thomas Lumley
On Tue, 22 May 2007, [EMAIL PROTECTED] wrote: Do I miss here something? Yes. dtaa = read.table(http://www.ats.ucla.edu/stat/mplus/examples/ma_snijders/mlbook1.dat;, sep=,) head(dtaa) # shows the data as it should be save(dtaa,dtaa,file=c:/dtaa) d = load(c:/dtaa) From ?load

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

2007-05-18 Thread Thomas Lumley
On Fri, 18 May 2007, jiho wrote: Hello, I am facing a problem with lapply which I think''' may be a bug. This is the most basic function in which I can reproduce it: myfun - function() { foo = data.frame(1:10,10:1) foos = list(foo) fooCollumn=2 cFoo =

Re: [R] Scoped options setting?

2007-05-17 Thread Thomas Lumley
On Wed, 16 May 2007, Zack Weinberg wrote: Is there any way to set options during the evaluation of a particular expression, with them automatically reset when control leaves that expression, however that happens? Kind of like let on a special variable does in Lisp. I naively tried You

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

2007-05-14 Thread Thomas Lumley
, 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 Thomas Lumley

Re: [R] PRESS criterion in leaps

2007-05-14 Thread Thomas Lumley
On Fri, 11 May 2007, Andrew Smith wrote: I thought it would be simplest to build on already existing functions like regsubsets in package leaps. It's easy enough to calculate the PRESS criterion for a fitted lm object, but I'm having trouble deciphering the structure of the regsubsets objects

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

2007-05-10 Thread Thomas Lumley
. -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 guide http

Re: [R] power 2x3 exact test

2007-05-10 Thread Thomas Lumley
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 exact power. -thomas Thomas Lumley

Re: [R] reference in article

2007-05-02 Thread Thomas Lumley
On Wed, 2 May 2007, Tomas Mikoviny wrote: Hi all R positive, does anyone know how to refer R in article? Every time you start R it says (in part) R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages

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

2007-04-25 Thread Thomas Lumley
On Wed, 25 Apr 2007, Leeds, Mark (IED) wrote: This is a terminology question not related to R. The literature often says that OLS is inefficient relative to GLS if the residuals in the system are correlated ( and the RHS sides of each are not identical ). Does this mean that OLS overestimates

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

2007-04-19 Thread Thomas Lumley
01326371852 __ 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. Thomas

Re: [R] help comparing two median with R

2007-04-17 Thread Thomas Lumley
On Tue, 17 Apr 2007, Robert McFadden wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Lemon Sent: Tuesday, April 17, 2007 12:37 PM To: Pedro A Reche Cc: r-help@stat.math.ethz.ch Subject: Re: [R] help comparing two median with R Pedro A

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 consonant with the

Re: [R] software comparison

2007-04-16 Thread Thomas Lumley
. 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 other packages they examined. -thomas Thomas Lumley

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-11 Thread Thomas Lumley
On Thu, 5 Apr 2007, John Kane wrote: Heck. I'd be happy to get an answer to what is happening here: mac - spss.get(H:/ONTH/Raw.data/Follow.sav) Warning message: H:/ONTH/Raw.data/Follow.sav: Unrecognized record type 7, subtype 16 encountered in system file It means that your file had a

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-11 Thread Thomas Lumley
On Thu, 5 Apr 2007, John Kane wrote: Heck. I'd be happy to get an answer to what is happening here: mac - spss.get(H:/ONTH/Raw.data/Follow.sav) Warning message: H:/ONTH/Raw.data/Follow.sav: Unrecognized record type 7, subtype 16 encountered in system file It means that your file had a

Re: [R] Using Sampling Weights in R

2007-04-11 Thread Thomas Lumley
On Tue, 10 Apr 2007, Thomas W. Volscho wrote: Dear List, I have a dataset that provides sampling weights (National Survey of Family Growth 2002). I want to produce a cross-tabulation and use the provided sampling weights to obtain representative population estimates. (I believe they are

Re: [R] Reasons to Use R

2007-04-11 Thread Thomas Lumley
to increase the size of datasets just as fast as it increases computational power. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-06 Thread Thomas Lumley
On Thu, 5 Apr 2007, John Kane wrote: Heck. I'd be happy to get an answer to what is happening here: mac - spss.get(H:/ONTH/Raw.data/Follow.sav) Warning message: H:/ONTH/Raw.data/Follow.sav: Unrecognized record type 7, subtype 16 encountered in system file It means that your file had a

Re: [R] unexpected behavior when creating a list of functions

2007-04-04 Thread Thomas Lumley
On Wed, 4 Apr 2007, Matthew Suderman wrote: I wanted to create a list of functions whose output differs depending the value of a variable when the function was created. Generally this did not work. Each function was exactly the same, as in the simple example below: get_data_function -

Re: [R] strange fisher.test result

2007-04-03 Thread Thomas Lumley
://faculty.washington.edu/tlumley/b514/exacttest.R with .Rd files at http://faculty.washington.edu/tlumley/b514/man/ [credits: this is all based on ideas from Scott Emerson] -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] Tail area of sum of Chi-square variables

2007-03-29 Thread Thomas Lumley
degrees of freedom. pchisqsum() in the survey package does this. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Tail area of sum of Chi-square variables

2007-03-29 Thread Thomas Lumley
-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] what is the difference between survival analysis and (...)

2007-03-28 Thread Thomas Lumley
of claim. I would argue that computational convenience on the one hand, and the ability to exercise lots of nice mathematical tools on the other hand have also contributed to the continuing popularity of the Cox model. -thomas Thomas Lumley Assoc. Professor, Biostatistics

Re: [R] Replacement in an expression - can't use parse()

2007-03-27 Thread Thomas Lumley
On Tue, 27 Mar 2007, Peter Dalgaard wrote: The way around this is to add a further layer of substitute() to insert the value of e: eval(substitute(substitute(call,list(u2=quote(x),u3=1)),list(call=e[[1]]))) u1 + x + 1 Or eval(do.call(substitute, list(e[[1]], list(u2=quote(x),u3=1)))

Re: [R] subset

2007-03-26 Thread Thomas Lumley
guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help

Re: [R] Hardware for a new Workstation for best performance using R

2007-03-19 Thread Thomas Lumley
. -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 guide http

Re: [R] Hardware for a new Workstation for best performance using R

2007-03-19 Thread Thomas Lumley
On Mon, 19 Mar 2007, Gabor Grothendieck wrote: On 3/19/07, Thomas Lumley [EMAIL PROTECTED] wrote: On Thu, 15 Mar 2007, Andrew Perrin wrote: (in part) 2.) Yes, by all means you should use linux instead of windows. The graphics output is completely compatible with whatever applications you

Re: [R] Mac vs. PC

2007-03-10 Thread Thomas Lumley
on most R tasks (though it will still be twice as pretty, of course). -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] GLM: order of terms in model

2007-03-09 Thread Thomas Lumley
PROTECTED] __ 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. Thomas

Re: [R] Memory error

2007-03-08 Thread Thomas Lumley
On Thu, 8 Mar 2007, Andrew Perrin wrote: Greetings- Running R 2.4.0 under Debian Linux, I am getting a memory error trying to read a very large file: library(foreign) oldgrades.df - read.spss('Individual grades with AI (Nov 7 2006).sav',to.data.frame=TRUE) Error: cannot allocate vector

Re: [R] Mitools and lmer

2007-03-05 Thread Thomas Lumley
. __ 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. Thomas Lumley

Re: [R] Timings of function execution in R [was Re: R in Industry]

2007-02-09 Thread Thomas Lumley
the arithmetic solution. Also, I didn't check if a solution like this would still be faster when both arguments are vectors (but there was a recent mailing list thread where someone else did). -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University

Re: [R] R in Industry

2007-02-07 Thread Thomas Lumley
On Tue, 6 Feb 2007, Muenchen, Robert A (Bob) wrote: That sounds like a good idea. The name R makes it especially hard to find job postings, resumes or do any other type of search. Googling resume+sas or job opening+sas is quick and fairly effective (less a few airline jobs). Doing that with R

Re: [R] Two ways to deal with age in Cox model

2007-02-05 Thread Thomas Lumley
On Mon, 5 Feb 2007, John Sorkin wrote: When running a cox proportional hazards model ,there are two ways to deal with age, including age as a covariate, or to include age as part of the follow-up time, viz, snip I would appreciate any thoughts about the differences in the interpretation of

Re: [R] read.spss and encodings

2007-02-05 Thread Thomas Lumley
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing

Re: [R] Help with efficient double sum of max (X_i, Y_i) (X Y vectors)

2007-02-02 Thread Thomas Lumley
/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 Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] read.spss and encodings

2007-02-01 Thread Thomas Lumley
On Thu, 1 Feb 2007, Thomas Friedrichsmeier wrote: Hi! I'm having trouble with importing spss files containing non-ascii characters Peter has explained what is going on. It would be ideal for read.spss() to do the translation to the current locale. This would require knowing what encoding

Re: [R] How to get correct integration in C for step function?

2007-01-22 Thread Thomas Lumley
On Sun, 21 Jan 2007, Lynette wrote: Dear all, I am using Rdqags in C to realize the integration. It seems for the continous C function I can get correct results. However, for step functions, the results are not correct. For example, the following one, when integrated from 0 to 1 gives 1

Re: [R] [ESS] How to get correct integration in C for step function?

2007-01-22 Thread Thomas Lumley
On Mon, 22 Jan 2007, Lynette wrote: Well, I have no idea either. I can get correct answers for continous functions but incorrect for step functions. I have just tried using Rdqags from C for the function x0 and it worked fine (once I had declared all the arguments correctly). The code is

Re: [R] How to get correct integration in C for step function?

2007-01-22 Thread Thomas Lumley
On Mon, 22 Jan 2007, Lynette wrote: Dear all, especially to Thomas, I have figured out the problem. For the step function, something wrong with my C codes. I should use the expression ((x=0.25)(x=0.75)) ? 2:1 instead of ((x=1/4)(x=3/4)) ? 2:1 ). Have no idea why 0.25 makes difference from

Re: [R] integrate and quadratic forms

2007-01-19 Thread Thomas Lumley
://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 Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] Is it the PPS samples i needed in R?

2007-01-16 Thread Thomas Lumley
On Fri, 12 Jan 2007, zhijie zhang wrote: Dear friends, I want to do a unequal probability sampling, that is, Probability Proportionate to size, Is it right for the following programs? Say my original dataset is: ID Population 1 100 2 200 3 300 IF the population is large

Re: [R] SAS and R code hazard ratios

2007-01-10 Thread Thomas Lumley
On Wed, 10 Jan 2007, [EMAIL PROTECTED] wrote: I am new to R and have been comparing CPH survival analysis hazard ratios between R and SAS PhReg. The binary covariates' HRs are the same, however the continuous variables, for example age, have quite different HRs although in the same direction.

Re: [R] memory problem

2007-01-08 Thread Thomas Lumley
On Sat, 6 Jan 2007, Zoltan Kmetty wrote: Hi! I had some memory problem with R - hope somebody could tell me a solution. I work with very large datasets, but R cannot allocate enough memoty to handle these datasets. You haven't said what you want to do with these datasets. -thomas

Re: [R] eval(parse(text vs. get when accessing a function

2007-01-05 Thread Thomas Lumley
way to do it. Often, there is. Sometimes, there isn't. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-help@stat.math.ethz.ch mailing list https

Re: [R] understanding integer divide (%/%)

2007-01-03 Thread Thomas Lumley
. __ 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. Thomas Lumley Assoc

Re: [R] Any container in R?

2007-01-01 Thread Thomas Lumley
inappropriate). -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

Re: [R] LU bug in Matrix package

2006-12-28 Thread Thomas Lumley
read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle

Re: [R] Memory problem on a linux cluster using a large data set [Broadcast]

2006-12-21 Thread Thomas Lumley
1000115558 7630.3 -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

Re: [R] attach and object masking

2006-12-19 Thread Thomas Lumley
On Tue, 19 Dec 2006, DEEPANKAR BASU wrote: Hi R users! I am new to R. When I try to attach a simple dataset using the attach() command, I get the following message: attach(data1) The following object(s) are masked from package:base : write Can someone tell me what this

Re: [R] attach and object masking

2006-12-19 Thread Thomas Lumley
On Tue, 19 Dec 2006, Thomas Lumley wrote: It also means that you have missed at least three upgrades of R (the fourth is just out) since in version 2.3.0 and more recent you don't get the warning when a variable and a function have the same name, only for two variables or two functions

Re: [R] Upgrading

2006-12-19 Thread Thomas Lumley
commented, minimal, self-contained, reproducible code. 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

  1   2   3   4   5   6   7   8   9   10   >