[R] Fitting a linear model with a break point

2009-09-08 Thread Daniel Brewer
any ideas? Also is there a way of including the threshold in the actual model, so that could be estimated too? Thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac

[R] A list of data.frames merged together

2010-03-09 Thread Daniel Brewer
1 5 ... 04/15/102 5 05/15/103 NA 06/15/10NA 5 Any ideas? I have been fiddling around with plyr and reshape without success Thanks Dan -- ****** Daniel Brewer, Ph.D. Institute of C

[R] Bulk editing of mySQL tables

2010-03-24 Thread Daniel Brewer
Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Regis

[R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread Daniel Brewer
m happy to use another heatmap function if ti would be better. I am not using the original heatmap as it does not provide a colour key. Thanks Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis

[R] Extract html tables to data.frames

2009-12-02 Thread Daniel Brewer
-- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee

[R] COnfidence intervals for estimates of linear model

2009-12-23 Thread Daniel Brewer
ormal distrbution? Thanks. Apologies for my naiivity Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institu

[R] CRAN: 64 bit OS X Leopard build

2009-06-24 Thread Daniel Brewer
Hello, I am after a stable 64 bit binary of R for OS X Leopard (i.e. 2.8). There seems to be the siggestion that thery should be available from CRAN: "leopardBinaries of universal (32-bit and 64-bit) package builds for Mac OS X 10.5 or higher" But when I follow the link there is only a co

[R] Found the stable 64bit OS X leopard builds

2009-06-24 Thread Daniel Brewer
Hi, I have found the stable 64bit OS X leopard builds here: http://r.research.att.com/ Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk

[R] order by decerasing 1st variable and increasing 2nd variable

2009-06-24 Thread Daniel Brewer
it doesn't. Thanks Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer

[R] Best way to turn a list into a data.frame

2009-04-06 Thread Daniel Brewer
ot; 3845 "04012" 3845 "04360" 1029 "04110" 1029 "04115" Any ideas? Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk **

Re: [R] Best way to turn a list into a data.frame

2009-04-06 Thread Daniel Brewer
Thanks thats marvellous. Does the trick beautifully. Dan hadley wickham wrote: > On Mon, Apr 6, 2009 at 8:49 AM, Daniel Brewer wrote: >> Hello, >> >> What is the best way to turn a list into a data.frame? >> >> I have a list with something like: >>

[R] Collapse data matrix with extra info separated by commas

2009-04-06 Thread Daniel Brewer
5 B 1 5 6 B 1 6 7 B 1 7 to something like this: a b c 1 A 1 1,2 3 A 2 3,4 5 B 1 5,6,7 This seems to be the sort of the thing that the reshape library should be able to do, but I just can't work out how to do it. Many thanks Dan -- **

[R] Does R support [:punct:] in regexps?

2009-04-09 Thread Daniel Brewer
Hello does R support [:punct:] in regular expressions? I am trying to strip all regular expressions for a vector of strings. > x <- c("yoda-yoda","billy!") > gsub("/[:punct:]/","",x) [1] "yoda-yoda" "billy!" Thanks Dan --

[R] Mathematical label in a plot with a percent sign

2009-04-28 Thread Daniel Brewer
;=5.("%")) almost works but includes brackets. Anyonw know how to solve this one Dan PS I am running R 2.9.0 -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Ema

Re: [R] Mathematical label in a plot with a percent sign

2009-04-28 Thread Daniel Brewer
That worked great. Many thanks. Dan Gabor Grothendieck wrote: > Try: > > plot(0, main = ~ x >= 5 * "%") > > > On Tue, Apr 28, 2009 at 6:37 AM, Daniel Brewer > wrote: >> Hi, >> >> I am trying to produce a plot with an xlabel that re

[R] Bristol mirror GPG problem ubuntu repository

2009-05-05 Thread Daniel Brewer
ng with the GPG signing at bristol. Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of

Re: [R] Bristol mirror GPG problem ubuntu repository

2009-05-06 Thread Daniel Brewer
Anyone know how to find the details of the mirror maintainers then? because I can't find it. Dan Uwe Ligges wrote: > > > Daniel Brewer wrote: >> Hello, >> >> I am getting a GPG error with the ubuntu repository at the bristol UK >> mirror. >> >>

[R] Highlighting a few bars in a barplot

2010-09-09 Thread Daniel Brewer
round colour and hatching which is different between bars. Any suggestions on how I should do this? Thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.

[R] expand comma separated field vertically in data.frame

2010-11-19 Thread Daniel Brewer
t out. ANy help would be gratefully received. Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institu

[R] Suitable test for ordinal variable vs continuous variable trend

2010-12-02 Thread Daniel Brewer
a chi squared trend might be appropriate. I don't have any experience dealing with ordinal variables so I am at a bit of a loss. What is the most appropriate test? and is it implemented in R? Many thanks ****** Daniel Brewer In

[R] melt causes errors when characters and values are used

2010-12-10 Thread Daniel Brewer
uld be an appropriate middle step. Thanks Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal

[R] Remove 100 years from a date object

2010-12-10 Thread Daniel Brewer
mat="%d.%m.%y") - 100*365 But that doesn't seem to work out correctly. Any ideas how to do this? Thanks Dan -- ********** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email

Re: [R] Remove 100 years from a date object

2010-12-10 Thread Daniel Brewer
On 10/12/2010 4:17 PM, Barry Rowlingson wrote: > On Fri, Dec 10, 2010 at 3:27 PM, Daniel Brewer > wrote: >> Hello, >> >> I have some data that has dates in the form 27.02.37. I convert them to >> a date object as follows: >> as.Date(data$date,format="

[R] Find classes for each column of a data.frame

2010-08-26 Thread Daniel Brewer
hanks Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitab

[R] Any tests/exams freely available with answers to test basic R knowledge

2011-06-09 Thread Daniel Brewer
wondering if anyone knew if there were any materials on the web that would be suitable? and is possible had both questions and answers. Many thanks Dan PS Cross-posted to http://stats.stackexchange.com -- ** Daniel Brewer, Ph.D. Institute

[R] Ancova: formula with a common intercept

2008-06-02 Thread Daniel Brewer
0.059190.55646 0.1060.916 p53plus 0.229770.55646 0.4130.682 Time:p53plus 0.118870.02524 4.709 4.62e-05 *** But I do not think that is doing what I want. Many thanks -- ********** Daniel Brewer, Ph.D. Inst

[R] Capturing coxph warnings and errors

2008-06-17 Thread Daniel Brewer
value etc are set to NA. 2) Suppress the Error and Warning messages What is the best way to do this? Thanks -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: [EMAIL PROTECTED

Re: [R] Capturing coxph warnings and errors

2008-06-18 Thread Daniel Brewer
> Terry Therneau > (author of coxph) > > -- ********** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: [EMAIL PROTECTED] ** The Institute of

[R] Equal vertical spaced labels on plot with log="y"

2008-03-20 Thread Daniel Brewer
the plot). Any ideas? Thanks -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: [EMAIL PROTECTED] ** The Institute of Cancer Research: Ro

[R] Adding name labels to x-axis of matplot

2008-03-26 Thread Daniel Brewer
Error in axis(side, at, as.graphicsAnnot(labels), tick, line, pos, outer, : 'labels' is supplied and not 'at' Any ideas? Is there are a more appropriate plot type? -- ****** Daniel Brewer, Ph.D. Institut

[R] cpower and censoring

2008-05-08 Thread Daniel Brewer
example of how I would get the power for a set control/non-control clinical trial where censoring occurs at an estimated rate with an estimated drop out rate. Quite confused about this. -- ** Daniel Brewer, Ph.D. Institute of Cancer Research

[R] pwr.2p2n.test when the ratio of n1/n2 is known

2008-10-24 Thread Daniel Brewer
one variable to be left null whereas I would like both n1 and n2 to be determined where I know there relative proportions. Any ideas how to do this? Is there a different function? Thanks Dan -- ** Daniel Brewer, Ph.D. Institute of

[R] Stacked barplot with two stacked bars besides each other

2009-01-20 Thread Daniel Brewer
make would be great. Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Com

Re: [R] Stacked barplot with two stacked bars besides each other

2009-01-20 Thread Daniel Brewer
Dallazuanna wrote: > Try this: > > barplot(cbind(as.matrix(var1), as.matrix(var2)), names.arg = LETTERS[1:4]) > > On Tue, Jan 20, 2009 at 8:28 AM, Daniel Brewer <mailto:daniel.bre...@icr.ac.uk>> wrote: > > Hi, > > I have a particular barplot I wou

Re: [R] Stacked barplot with two stacked bars besides each other

2009-01-20 Thread Daniel Brewer
art(values ~ ind, groups = Var, data = newVar) > > > On Tue, Jan 20, 2009 at 9:03 AM, Daniel Brewer <mailto:daniel.bre...@icr.ac.uk>> wrote: > > Thanks. > That is definitely in the right direction, but firstly I would like > yoda1:var1 next to yoda1:

[R] Memory issue?

2009-01-27 Thread Daniel Brewer
x27;t always occur even if the script is run with exactly the same data. Does rm() actually free up memory? Thanks Dan -- ****** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis

[R] Use SOCKS proxy

2009-01-29 Thread Daniel Brewer
Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limit

[R] Can no longer use resize graphics X windows

2009-03-02 Thread Daniel Brewer
Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Regis

[R] Log rank test power calculations

2008-01-31 Thread Daniel Brewer
-- ** Daniel Brewer, Ph.D. Institute of Cancer Research Email: [EMAIL PROTECTED] ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with

[R] Best way to strsplit a column

2008-03-04 Thread Daniel Brewer
es in the column do not contain a ":" so should have a "NA" in the second column of the result, and this makes doing an unlist a non-starter. Any ideas? Many thanks Daniel Brewer The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarante

[R] Returning a vector from by

2008-11-03 Thread Daniel Brewer
by" I would like it to return a vector with the names as the ID column. The only way I could work out how to do this was result <- as.vector(yoda) names(result) <- names(yoda) result a b 2 1 Is there a better way? Thanks Dan -- ***

[R] group by quantiles

2008-11-18 Thread Daniel Brewer
Hello, I was just wondering whether there is a quick way to divide a vector of data into four groups defined by the quantiles? i.e. 0-25% 25-50% 50-75% 75-100% Many thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research

[R] pwr.prop.test and continuity correction

2008-12-16 Thread Daniel Brewer
-- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre...@icr.ac.uk ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in

[R] Cox regression and p-values

2007-09-18 Thread Daniel Brewer
. More specifically, when expected counts are less than 5 is the Fisher's exact test used instead of the Chi^2 test? Many thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Email: [EMAIL PROT

[R] Calculate difference between dates in years

2007-09-24 Thread Daniel Brewer
have looked at difftime but that does not seem to allow output in years. Many thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Email: [EMAIL PROTECTED] ** The

[R] Using expression for Italics and object evaluation in plot title

2007-10-10 Thread Daniel Brewer
l" rather than the object value. I have tried various combinations of paste and expression but it seems that to get the italic expression function has to be called first. Any ideas on how to get round this problem? Thanks Dan -- **********

Re: [R] Using expression for Italics and object evaluation in plot title

2007-10-10 Thread Daniel Brewer
(sub=bquote(Log rank" Dan Gabor Grothendieck wrote: > Try bquote as in: > > http://tolstoy.newcastle.edu.au/R/e2/help/07/09/26353.html > > On 10/10/07, Daniel Brewer <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am trying to get a title on a plot that

[R] grep with "|" character

2007-10-23 Thread Daniel Brewer
an unrecognized escape in a character string 2: unrecognized escape removed from "\|" Anyone know how to solve this? Dan -- ********** Daniel Brewer, Ph.D. Institute of Cancer Research Email: [EMAIL PROTECTED] ***