[R] Question about lrandom effects specification in lme4

2008-12-04 Thread Bert Gunter
~ ... + (A|Grp) + (B|Grp) + (C|Grp)) then they are uncorrelated but have different variances. Motivation: I'd like to use lmer instead of lme for fitting smoothing splines to longitudinal data. Cheers, Bert Gunter Genentech __ R-help@r-project.org mailing

[R] Question about lrandom effects specification in lme4 : Correction

2008-12-04 Thread Bert Gunter
... Of course what I should have said is: lmer( y ~ ... + (-1+A|Grp) + (-1+B|Grp) + (-1+C|Grp)) Cheers, Bert Gunter Genentech __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Sink does not send graphs to sink file

2008-12-05 Thread Bert Gunter
I think Sweave and/or odfWeave are the real answer, though. Obviously, a bigger and more elaborate kettle of fish. -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Rowlingson Sent: Friday, December 05, 2008 9:21 AM To: Philipp Pagel

Re: [R] Running R Script on a Sequence of Files

2008-12-05 Thread Bert Gunter
R has quite a few functions to get and manipulate filenames to facilitate exactly what you want to do. See ?files and especially the links at the end to the file name manipulation functions. e.g. dir(pathname) lists all file names in the directory pathname. ?list.files gives details. -- Bert

[R] lazy evaluation and scoping ?

2008-12-08 Thread Bert Gunter
. Adding the force(i) statement forces i to be evaluated separately at each iteration of the loop, thus placing the current values of i at each iteration into each function's enclosing environment. HTH. -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: [R] Scan a folder for a given type of files

2008-12-08 Thread Bert Gunter
?files and the links therein. Seems like a most obvious keyword to me for asking about files ... Cheers, Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, December 08, 2008 1:54 PM To: r-help@r-project.org

Re: [R] Polar coordinates - contour plots

2008-12-09 Thread Bert Gunter
be available in packages if fiddling doesn't suit. -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Todor Kondic Sent: Tuesday, December 09, 2008 3:19 PM To: r-help@r-project.org Subject: [R] Polar coordinates - contour plots Hello, I have

Re: [R] Error: protect () : protection stack overflow

2008-12-09 Thread Bert Gunter
Apparently the former, as I got the same error in R2.7.1 on Windows. Matbe relevant info(?): $platform [1] i386-pc-mingw32 $arch [1] i386 $os [1] mingw32 $system [1] i386, mingw32 -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [R] missing argument

2008-12-10 Thread Bert Gunter
I believe the usual practice in this case is simply to give default values for arguments: function(x, y, opt.arg1 = 0, opt.arg2 = sin(1),...) If you haven't already done so, perusal of An Introduction to R -- especially the Named Arguments and Defaults -- would be appropriate. Cheers, Bert

Re: [R] repeated searching of no-missing values

2008-12-10 Thread Bert Gunter
)[f.new] converts f.new to the appropriate character vector. And so forth. So the key is: pay **careful** attention to the docs. -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrizio Frederic Sent: Wednesday, December 10, 2008 2:09 PM

Re: [R] repeated searching of no-missing values

2008-12-10 Thread Bert Gunter
] On Behalf Of hadley wickham Sent: Wednesday, December 10, 2008 3:52 PM To: Bert Gunter Cc: r-help@r-project.org Subject: Re: [R] repeated searching of no-missing values graphics,statistical analysis etc. as well as programming. There are just too many possible data structures to expect logical

[R] R imperfections? -- was: repeated searching of no-missing values

2008-12-11 Thread Bert Gunter
Replies inline below. Best regards, -- Bert ___ From: macra...@gmail.com [mailto:macra...@gmail.com] On Behalf Of Stavros Macrakis Sent: Thursday, December 11, 2008 10:53 AM To: Bert Gunter Cc: Patrizio Frederic; r-help@r-project.org Subject: Re: [R] repeated

Re: [R] Check if data frame column is numeric

2008-12-16 Thread Bert Gunter
... and an addendum Hadley Wickham's plyR package attempts to redress these (nevertheless documented) apparent inconsistencies in the *apply family of functions by handling everything in a more consistent intuitive manner. You may wish to use those instead of the base R *apply functions. -- Bert

Re: [R] statistical significance, nonlinear regression

2008-12-24 Thread Bert Gunter
by looking for tutorials on the subject pitched to your profession and level of statistical understanding. Google is your friend here. -- Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of adam99

Re: [R] How can I avoid nested 'for' loops or quicken the process?

2008-12-26 Thread Bert Gunter
, the issue arises frequently. -- Bert Gunter Genentech -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Prof Brian Ripley Sent: Friday, December 26, 2008 12:44 AM To: Oliver Bandel Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] How can I

[R] R badly lags matlab on performance? -- Define performance, please.

2009-01-04 Thread Bert Gunter
to extingush the need for continuing improvement(the demise of Luke Tierney's X-Lisp Stat is an example): what's the next step in the sequence IMSL -- SAS --- S/R -- ?? . But hopefully this is merely my ignorance speaking, and smart folks are already working on it. Regards to all, Bert Gunter

Re: [R] how specify lme() with multiple within-subject factors?

2009-01-04 Thread Bert Gunter
book with me for the reference). Also, lme, not lmer, is currently the only way to implement penalized splines as random effects -- see the lmeSplines package. -- Bert Gunter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Duplicated messages

2009-01-06 Thread Bert Gunter
posts occur. So please choose one or the other, not both. -- Bert Gunter __ R-help@r-project.org 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

Re: [R] Generating GUI for r-scripts

2009-01-08 Thread Bert Gunter
If you are on Windows (you didn't say!) see also ?winMenuAdd, ?winDialog ?choose.files etc. -- Bert Gunter Genentech -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mike Prager Sent: Thursday, January 08, 2009 8:29 AM To: r-h

Re: [R] R in the NY Times

2009-01-10 Thread Bert Gunter
. Cheers to all, Bert Gunter -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Barry Rowlingson Sent: Saturday, January 10, 2009 10:32 AM To: Tony Breyal Cc: r-help@r-project.org Subject: Re: [R] R in the NY Times 2009/1/10 Tony

[R] Non-R but interesting statistics-related NATURE article: FYI only

2009-01-14 Thread Bert Gunter
and amusement. IF THIS IS INAPPROPRIATE FOR THIS LIST please let me know, and I will refrain from any such posts in the future (though I think this is the only one like it I've ever done. I value this list too highly to be a polluter. Cheers, Bert Gunter __ R

Re: [R] Loess fitting with bisquare

2009-01-22 Thread Bert Gunter
by scaled residual size. -- Bert Gunter Genentech -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Greg Snow Sent: Thursday, January 22, 2009 9:38 AM To: Marcin Kozak; r-help@r-project.org Subject: Re: [R] Loess fitting with bisquare

Re: [R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Bert Gunter
Don't use replacePatterns() (-- and what package is that from, btw??). gsub(abc|def,Yes,sample[[1]]) Incidentally, sample is a rather bad name for your dataset, as it is the name of a commonly use R function. Ergo, possibility of confusion. Bert Gunter Genentech Nonclinical Biostatisics

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Bert Gunter
?with Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Tuesday, August 11, 2009 12:27 PM To: Jim Bouldin Cc: r-help@r-project.org Subject: Re: [R] problem

Re: [R] Is there a summary on different version of 'apply' functions?What is the meaning of the prefixes?

2009-08-11 Thread Bert Gunter
?help.search help.search(apply) Problem is, various packages have added their own apply-type functions; so what you get depends on what packages you have downloaded. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun

Re: [R] R numeric string problem

2009-08-12 Thread Bert Gunter
as a numeric, check out Ryacas or some other computer algebra package that is capable of infinite precision arithmetic. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew C Sent

Re: [R] shading between two smoothed curves

2009-08-13 Thread Bert Gunter
?polygon Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Graves, Gregory Sent: Thursday, August 13, 2009 11:17 AM To: r-help@r-project.org Subject: [R] shading between two smoothed

Re: [R] Replacing NA values in one column of a data.frame

2009-08-18 Thread Bert Gunter
, courteous, professional exchange on the issue will itself be informative to useRs. Cheers to all, Bert Bert Gunter Genentech Nonclinical Biostatisics __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] value of nth percentile

2009-08-18 Thread Bert Gunter
Inline below. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Tuesday, August 18, 2009 8:07 AM To: Ajay Singh Cc: r-help@r-project.org Subject: Re: [R] value

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Bert Gunter
+ examples) is at least a reasonable answer to the query (allowing the reader to at least infer that bxp does not distinguish degrees of outlyingness), so I don't understand your criticism. Feel free to respond privately if you prefer. -- Bert Bert Gunter Genentech Nonclinical Biostatisics

Re: [R] a naive question

2009-08-19 Thread Bert Gunter
to read the docs to understand -- is that in R a table from read.table() is actually a data frame, which is also a special kind of list. As the error message says, as.numeric() cannot coerce recursive objects (which is what a list is) to simple numeric vectors. Bert Gunter Genentech Nonclinical

Re: [R] Several simple but hard tasks to do with R

2009-08-19 Thread Bert Gunter
ago. Hope this clarifies... Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rakknar Sent: Wednesday, August 19, 2009 2:52 PM To: r-help@r-project.org Subject: [R] Several simple but hard

Re: [R] splitting a string up

2009-08-21 Thread Bert Gunter
gsub(\\_.*,,x) This assume _ if the first character following the numbers. You may need a character class if it can be one of several. ?gsub ?regex for further (terse for the latter) details. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r

Re: [R] splitting a string up

2009-08-21 Thread Bert Gunter
Actually _ is not a metacharacter so, gsub(_.*,,x) will do. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Doran, Harold Sent: Friday, August 21, 2009 12:55 PM To: stephen sefick; r

Re: [R] robust method to obtain a correlation coeff?

2009-08-24 Thread Bert Gunter
Inline below. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Monday, August 24, 2009 8:53 AM To: David Winsemius Cc: r-help@r-project.org Help; ted.hard

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-24 Thread Bert Gunter
Have you looked at the Spatial task view on CRAN? That would seem to me the logical first place to go. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of timothy_hand...@nps.gov Sent

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Bert Gunter
?round Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mehdi Khan Sent: Monday, August 24, 2009 11:52 AM To: Erik Iverson Cc: r-help@r-project.org Subject: Re: [R] Unique command

Re: [R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Bert Gunter
issue that led to this model? -- what are the data? -- etc. etc. before I would even hazard advice on the statistical details(Please do not answer these questions either publicly or privately, as they are just fyi's). Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Bert Gunter
. Alternatively, wait for someone smarter to reply -- which I'm sure will occur given the clarity with which you posed your problem. Cheers, Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Judith

Re: [R] Regular expression to define contents between parentheses

2009-08-25 Thread Bert Gunter
Ha! Much better than mine and without PERL, to boot. Bravo Gabor! -- Bert Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck Sent: Tuesday, August 25, 2009 2:03 PM

Re: [R] specify a model in differential equations (nlme)

2009-08-26 Thread Bert Gunter
For nlme, no. However, take a look at the CRAN Task View for pharmokinetics and packages recommended there, especially nlmeODE . You might also try R's search capabilities: RSiteSearch(differential equations) ?RSiteSearch of other non-R search engines Bert Gunter Genentech Nonclinical

Re: [R] find numbers in a line with letters

2009-08-26 Thread Bert Gunter
([^[:digit:].]+, ,x) [1] 3.32 10.00 You can then pipe this through a textConnection to convert it to numeric: scan(textConnection(gsub([^[:digit:].]+, ,x))) Read 2 items [1] 3.32 10.00 Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org

Re: [R] Does split() preserve order?

2009-08-26 Thread Bert Gunter
want. Viz. split(1:3,letters[3:1]) $a [1] 3 $b [1] 2 $c [1] 1 f - factor(letters[3:1],levels = letters[3:1]) split(1:3,f) $c [1] 1 $b [1] 2 $a [1] 3 Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] select one function from two of them in another function

2009-08-27 Thread Bert Gunter
in the parentheses as usual: test3(function(x)x^2) (5) [1] 25 Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jim holtman Sent: Thursday, August 27, 2009 1:58 PM To: SH.Chou Cc: r-help@r

Re: [R] Transform data for repeated measures

2009-08-27 Thread Bert Gunter
I suspect reshape() is the function you're looking for; there is also a reshape package that you might prefer. It's also quite easy to do this in base R using unlist() and some indexing with rep, but that may be more than you care to deal with. Bert Gunter Genentech Nonclinical Biostatisics

Re: [R] Help with glmer {lme4) function: how to return F or tstatistics instead of z statistics.

2009-08-28 Thread Bert Gunter
://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models Cheers, Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Raldo Kruger Sent: Friday, August 28, 2009 3:46 AM To: r-help@r-project.org Subject: [R

Re: [R] Re gression - cluster option in STATA

2009-09-01 Thread Bert Gunter
A guess, as I don't know STATA: ?lme (library(nlme) first) (also perhaps anova with an Error term -- ?anova) But: R is not STATA R is not SAS R is not SPSS ... R is R So do not expect the same paradigms to hold; but because R IS R, one can always program ways to make them hold. Bert Gunter

Re: [R] Grouping data in a data frame: is there an efficient way todo it?

2009-09-02 Thread Bert Gunter
describe in R code. Whether Perl or Python would be faster I cannot say -- but are you including the time required to develop and debug the script in your assessment? Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun

Re: [R] variable selection in logistic

2009-09-03 Thread Bert Gunter
is a way to determine the truly important variables, then the study must be designed to provide the information to do so. You don't get something for nothing. Cheers, Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread Bert Gunter
My guess would be: Likelihood comparisons are not meaningful for objects fit using restricted maximum likelihood and with different fixed effects. (from ?anova.lme in the nlme package). Are you using the REML = TRUE default? Bert Gunter Genentech Nonclinical Statistics -Original Message

[R] Genentech Nonclinical Biostatistics Position in South San Francisco

2009-09-08 Thread Bert Gunter
Genentech has a full time job opening for a statistician in its nonclinical biostatistics group in South San Francisco, CA. For details, please go to the R-sig-jobs mailing list here: https://stat.ethz.ch/pipermail/r-sig-jobs/2009q3/70.html (you may need to subscribe to view this). Bert

Re: [R] optim() argument scoping: passing parameter values into user's subfunction

2009-09-09 Thread Bert Gunter
Inline below. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Tuesday, September 08, 2009 7:29 PM To: r-help@r-project.org Subject: Re: [R] optim() argument scoping

Re: [R] Stats help with calculating between and within subject variance and confidence intervals

2009-09-09 Thread Bert Gunter
there are sufficient df is via the lme() function in the nlme package -- it will work with unbalanced data and not just in the balanced data situation. But there would be a considerable learning curve required, I realize. Cheers, Bert Gunter Genentech Nonclinical Biostatistics -Original Message

Re: [R] numerical integration

2009-09-10 Thread Bert Gunter
My goodness! Did you try ?integrate ? Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Roslina Zakaria Sent: Thursday, September 10, 2009 3:36 PM To: r-help@r-project.org Subject: [R

Re: [R] Complex binning?

2009-09-10 Thread Bert Gunter
packages: plyr reshape (the package, not the base R function) There may well be others... Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mark Knecht Sent: Thursday, September 10

Re: [R] How to refer to the last a few rows?

2009-09-14 Thread Bert Gunter
?nrow Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Federman, Douglas Sent: Monday, September 14, 2009 9:03 AM To: Peng Yu; r-h...@stat.math.ethz.ch Subject: Re: [R] How to refer

Re: [R] how to determine if a variable is already set?

2009-09-14 Thread Bert Gunter
) [1] 2 Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Henrique Dallazuanna Sent: Monday, September 14, 2009 12:44 PM To: carol white Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] how

Re: [R] T-test to check equality, unable to interpret the results.

2009-09-16 Thread Bert Gunter
that Steve's apparent confusion -- or at least imprecise statements -- is widespread among scientists, in my experience, and leads to frequent misapplications and misinterpretations of significance testing. The woes of Stat 101 training. ... But that's another diatribe... Bert Gunter Genentech Nonclinical

Re: [R] How to separate a function by 2 probabilities

2009-09-17 Thread Bert Gunter
Assuming storage is not a problem, first generate two matrices, one by each method, call these A and B. Then if dim(A) = dim(B) = c(m,n) and k = m*n z - rbinom(k,1, .7) result - A*z + B*(1-z) Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread Bert Gunter
... Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mark Knecht Sent: Friday, September 18, 2009 11:55 AM To: jim holtman Cc: r-help; Phil Spector Subject: Re: [R] lapply - value changes

Re: [R] Changepoints estimation in a data series

2010-03-01 Thread Bert Gunter
RSiteSearch(segmented regression) Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of FMH Sent: Monday, March 01, 2010 1:17 PM To: r-help@r-project.org Subject: [R] Changepoints

Re: [R] Generating variable from 2 others in dataframe

2010-03-01 Thread Bert Gunter
You have to nest the ifelse's: test$hhtype - with(test, ifelse(eif==1,1,ifelse(year2000,2,3))) Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of o.mann...@auckland.ac.nz Sent

Re: [R] Binding a matrix to a matrix

2010-03-02 Thread Bert Gunter
) is: NewArray - array(c(a1,m1),dim=c(2,10,201)) Cheers, Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf Turner Sent: Tuesday, March 02, 2010 2:33 PM To: Luis Felipe Parra Cc: r-help@r

Re: [R] counting the number of ones in a vector

2010-03-03 Thread Bert Gunter
x - rep(c(A,B),c(4,3)) table(x)['A'] Capiche? Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Randall Wrong Sent: Wednesday, March 03, 2010 3:03 PM To: Nutter, Benjamin; Henrique

[R] Unsigned Posts; Was Setting graphical parameters

2010-03-04 Thread Bert Gunter
responses. -- Bert Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf Turner Sent: Wednesday, March 03, 2010 6:42 PM To: Pitmaster Cc: r-help@r-project.org Subject: Re: [R] Setting

Re: [R] data frame select max group by like function

2010-03-09 Thread Bert Gunter
to the base R versions, however, and in fact my preferred approach to this is simply: with(Dat, tapply(seq_len(nrow(Dat)),ID,function(i)year[i][which.max(score[i])])) In any case, you should invest the time to learn either (or both) the base R or plyr version of the apply() functions. Bert Gunter

Re: [R] ifelse logic and multiple assignments

2010-03-10 Thread Bert Gunter
. on e.g. R Statistical Language). My point is: to use R effectively, you need to purge SAS from your brain and think about things in a new way. Tough to do, I know, but your efforts will be generously rewarded. As always, contrary views welcome. Bert Gunter Genentech Nonclinical Statistics

Re: [R] Form using R

2010-03-12 Thread Bert Gunter
) with a single push of a button. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nilza BARROS Sent: Friday, March 12, 2010 11:07 AM To: Ista Zahn; r-help@r-project.org Subject: Re

Re: [R] function arguments: name of an object vs. call producing theobject?

2010-03-16 Thread Bert Gunter
of the argument (e.g. if it's a formula it will inherit from formula). 3) Or create separate (S3) methods foo.glm, foo.formula, etc. for the different classes that you wish to consider. This might be the cleanest approach, but it requires more planning. HTH Bert Gunter Genentech Nonclinical Biostatistics

Re: [R] R Advanced Programming Course in USA

2010-03-17 Thread Bert Gunter
I think you need to define what you mean by advanced to avoid misunderstanding. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Trevor O'brien Sent: Wednesday, March 17, 2010 1

Re: [R] unbind matrix?

2010-03-18 Thread Bert Gunter
Convert your matrix to a data frame and use do.call(). ?do.call do.call(Myfunc, data.frame(yourMatrix)) You need to do the data frame conversion because do.call wants the arguments as a list and a data frame **is** a list (the columns are the list members) with a dim attribute (+ others). Bert

Re: [R] lattice: defining graphical parameters

2010-03-24 Thread Bert Gunter
: trellis.par.set(layout.heights = list(top.padding = .5)) (I'm not sure this will do what you want, but at least the call will be correct.) All this is explained in ?trellis.par.set. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org

[R] Off Topic: teenie weenie numbers -- Was: Precision level

2010-03-26 Thread Bert Gunter
somewhat). Just curious. Hope this abuse of the list is not too egregious. Ignore if you think it is. Cheers to all, Bert Gunter Genentech Nonclinical Statistics __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] NA values in indexing

2010-03-26 Thread Bert Gunter
Is this, from the man page, relevant? An empty index selects all values: this is most often used to replace all the entries but keep the attributes. Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org

Re: [R] Competing with SPSS and SAS: improving code that loops throughrows (data manipulation)

2010-03-26 Thread Bert Gunter
how to fix the situation on your own. Cheers, Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dimitri Liakhovitski Sent: Friday, March 26, 2010 2:06 PM To: r-help Subject: [R] Competing

Re: [R] Matching pairs of values

2010-03-28 Thread Bert Gunter
Sorting is unnecesssary. If column order is unimportant, identical() is unnecessary. foo - function(x,lookfor)apply(x,1,function(x)all(lookfor %in% x will do. If column order is important, apply(x,1,identical,lookfor) will do. Bert Gunter Genentech Nonclinical Statistics -Original

Re: [R] Ellipse that Contains 95% of the Observed Data

2010-03-29 Thread Bert Gunter
Easy. See below. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tom La Bone Sent: Monday, March 29, 2010 6:56 AM To: r-help@r-project.org Subject: Re: [R] Ellipse that Contains 95

Re: [R] Ellipse that Contains 95% of the Observed Data

2010-03-29 Thread Bert Gunter
statistical details, about which all I can safely say is: The question is not Are they the same? Cheers, Bert Gunter Genentech Nonclinical Biostatistics P.S. Technical comment (because, alas, I **are** a statistician): You probably want the ellipsoids you speak of to cover subsets of the **populations

Re: [R] Ellipse that Contains 95% of the Observed Data

2010-03-29 Thread Bert Gunter
Typo: **Paul_i** Exclusion Principle Bert Gunter Genentech Nonclinical Biostatistics __ R-help@r-project.org 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] Finding common an unique elements in character vectors

2010-03-29 Thread Bert Gunter
?setdiff Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Jensen Sent: Monday, March 29, 2010 10:53 AM To: r-help@r-project.org Subject: [R] Finding common an unique

Re: [R] Error singular gradient matrix at initial parameterestimates in nls

2010-03-30 Thread Bert Gunter
non-identifiable. If you don't know what the above means, you shouldn't be using nls. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck Sent: Tuesday, March 30, 2010

Re: [R] Code is too slow: mean-centering variables in a data frame bysubgroup

2010-03-30 Thread Bert Gunter
?scale Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dimitri Liakhovitski Sent: Tuesday, March 30, 2010 8:05 AM To: r-help Subject: [R] Code is too slow: mean-centering

Re: [R] Error singular gradient matrix at initial parameter estimates in nls

2010-03-31 Thread Bert Gunter
. Examining lots of plots is probably a good place to begin. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Corrado Sent: Wednesday, March 31, 2010 6:13 AM Cc: r-help@r

Re: [R] Summing data based on certain conditions

2010-03-31 Thread Bert Gunter
?ave or ?tapply Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Murray Sent: Wednesday, March 31, 2010 10:20 AM To: r-help@r-project.org Subject: [R] Summing data based

Re: [R] lattice: how to add points to the plot generated bylevelplot()?

2010-03-31 Thread Bert Gunter
with more examples than R's man pages. Tip 4: Depending on your needs and predilections, you may prefer to use ggplot2. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Erik

Re: [R] sample size 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Bert Gunter
, as always. Cheers to all, Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Frank E Harrell Jr Sent: Thursday, April 01, 2010 5:02 AM To: vibha patel Cc: r-help@r-project.org Subject

Re: [R] Cross-validation for parameter selection (glm/logit)

2010-04-02 Thread Bert Gunter
Inline below: Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Friday, April 02, 2010 2:34 PM To: Jay Cc: r-help@r-project.org Subject: Re: [R] Cross-validation

Re: [R] Data manipulation problem

2010-04-05 Thread Bert Gunter
(the lattice package). This avoids the arbitrariness and discontinuities of binning by age range.) Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of moleps Sent: Monday, April 05, 2010

Re: [R] Matrix elements are vectors

2010-04-05 Thread Bert Gunter
Use lists: ?list (but probably assumes you know what a list is already) Relevant sections of An Introduction to R. (Considerable time and effort have been spent writing this to ease the entry of new users into R. Have you devoted any time or effort to reading it? ) Bert Gunter Genentech

Re: [R] checking bivariate normality

2010-04-06 Thread Bert Gunter
Below. -- Bert Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Liviu Andronic Sent: Tuesday, April 06, 2010 2:06 PM To: arindam fadikar Cc: r-help@r-project.org Subject: Re: [R

Re: [R] Odd results with %% and conserving memory

2010-04-06 Thread Bert Gunter
?%/% Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of JustinNabble Sent: Tuesday, April 06, 2010 2:27 PM To: r-help@r-project.org Subject: Re: [R] Odd results with %% and conserving memory

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Bert Gunter
I suspect the following is way slower and clunkier, but it does give you another way: ?tryCatch ## as in tryCatch(1+x,error=function(e) return(darnit)) [1] darnit Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Bert Gunter
Scratch my previous suggestion. Utter nonsense. Sigh... It's been a tough week. -- Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew Yee Sent: Friday, April 09, 2010

Re: [R] lattice garphs: combining multiple scatterplots and addinglegend

2010-04-12 Thread Bert Gunter
There us no groups argument in your xyplot call, so how is auto.key supposed to define a legend? (and note that auto.key should be a logical not a list). Please re-read the auto.key section in the xyplot man page. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From

Re: [R] Multilevel Survival Analysis - Cox PH Model

2011-07-01 Thread Bert Gunter
not be preparatory studies but superfluous diversions. -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics 467-7374 http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm __ R-help@r-project.org

Re: [R] if else lop

2011-07-05 Thread Bert Gunter
the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions. -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics 467-7374 http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Bert Gunter
of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions. -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics 467-7374 http

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Bert Gunter
Yes. Trellis plots are in the lattice package. My bad. -- Bert On Tue, Jul 5, 2011 at 3:22 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Quick note: On Tue, Jul 5, 2011 at 6:16 PM, Bert Gunter gunter.ber...@gene.com wrote: Yes, it can be done using basic plot commands

Re: [R] elegant way of removing NA's and selecting specific values from a data.frame

2011-07-06 Thread Bert Gunter
truths, and will often be impatient with elementary studies or fight shy of them. If it were possible to reach the ultimate truths without the elementary studies usually prefixed to them, these would not be preparatory studies but superfluous diversions. -- Maimonides (1135-1204) Bert Gunter

Re: [R] Simulating from the null distribution of a 2 x 3 table

2011-07-06 Thread Bert Gunter
not be preparatory studies but superfluous diversions. -- Maimonides (1135-1204) Bert Gunter Genentech Nonclinical Biostatistics __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

<    1   2   3   4   5   6   7   8   9   10   >