[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] melt causes errors when characters and values are used

2010-12-10 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

[R] Remove 100 years from a date object

2010-12-10 Thread Daniel Brewer
) - 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: daniel.bre...@icr.ac.uk

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 daniel.bre...@icr.ac.uk 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=%d.%m.%y) But this gives me

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

2010-12-02 Thread Daniel Brewer
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 Institute

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

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

[R] Highlighting a few bars in a barplot

2010-09-09 Thread Daniel Brewer
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.ac.uk

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

2010-08-26 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

[R] Bulk editing of mySQL tables

2010-03-24 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

[R] A list of data.frames merged together

2010-03-09 Thread Daniel Brewer
NA 5 Any ideas? I have been fiddling around with plyr and reshape without success Thanks Dan -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis MUCRC 15 Cotswold Road Sutton, Surrey SM2 5NG

[R] COnfidence intervals for estimates of linear model

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

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

2009-11-23 Thread Daniel Brewer
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 Email: daniel.bre...@icr.ac.uk

[R] Fitting a linear model with a break point

2009-09-08 Thread Daniel Brewer
? 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.uk

[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

[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 but 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 Research: Royal

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. When my source.list has this line: deb http

[R] Bristol mirror GPG problem ubuntu repository

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

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

2009-04-28 Thread Daniel Brewer
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 Email: daniel.bre...@icr.ac.uk

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 daniel.bre...@icr.ac.uk wrote: Hi, I am trying to produce a plot with an xlabel that reads (x = 5%) with the = turned into the correct

[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 -- ** Daniel Brewer, Ph.D

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

2009-04-06 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

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 daniel.bre...@icr.ac.uk wrote: Hello, What is the best way to turn a list into a data.frame? I have a list with something like: $`3845` [1] 04010 04012 04360

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

2009-04-06 Thread Daniel Brewer
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 -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.bre

[R] Can no longer use resize graphics X windows

2009-03-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, Registered

[R] Use SOCKS proxy

2009-01-29 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

[R] Memory issue?

2009-01-27 Thread Daniel Brewer
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 Email: daniel.bre...@icr.ac.uk

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

2009-01-20 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

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 daniel.bre...@icr.ac.uk mailto:daniel.bre...@icr.ac.uk wrote: Hi, I have a particular barplot I would like to generate, but I

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

2009-01-20 Thread Daniel Brewer
20, 2009 at 9:03 AM, Daniel Brewer daniel.bre...@icr.ac.uk 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:var2, not as currently yoda1:var1, yoda2:var1, yoda1:var2, yoda2:var2

[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

[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] Returning a vector from by

2008-11-03 Thread Daniel Brewer
. 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 -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis

[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

Re: [R] Capturing coxph warnings and errors

2008-06-18 Thread Daniel Brewer
) -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: [EMAIL PROTECTED] ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee

[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

[R] Ancova: formula with a common intercept

2008-06-02 Thread Daniel Brewer
0.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. Institute of Cancer Research Molecular

[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] Adding name labels to x-axis of matplot

2008-03-26 Thread Daniel Brewer
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. Institute of Cancer Research Molecular

[R] Best way to strsplit a column

2008-03-04 Thread Daniel Brewer
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 Guarantee, Registered in England under

[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

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

2007-10-10 Thread Daniel Brewer
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 -- ** Daniel Brewer, Ph.D. Institute of Cancer Research

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

2007-10-10 Thread Daniel Brewer
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 contains both some formatting and prints the value of an object. What I have