[R] Extract complete rows by group and maximum

2011-04-28 Thread Sandy Small
o I extract the whole line so that I can get a dataframe with all the data for the maximum line? (dput output from first 5 rows of my actual dataframe follows) Any help would be much appreciated. Thanks in advance Sandy Small structure(list(cvd_basestudy = c("study1", "study2

[R] Finding the dominant factor in an unbalanced group

2011-02-02 Thread Sandy Small
t;), tl = c(302L, 211L, 347L, 223L, 178L, 230L, 243L, 278L, 391L, 252L), tr = c(99L, 134L, 171L, 210L, 158L, 252L, 89L, 247L, 258L, 168L), br = c(305L, 212L, 346L, 223L, 178L, 231L, 244L, 277L, 388L, 254L), bl = c(142L, 288L, 284L, 191L, 144L, 360L, 147L, 184L, 164L, 186L)), .Names = c("basestud

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-20 Thread Sandy Small
oblems in that when I use geom_hline and facet_grid together I get two extra empty panels A reproducible example can be found at: [2]https://gist.github.com/786894 Sandy Small From: [3]h.wick...@gmail.com [[4]h.wick...@gmail.com] On

Re: [R] ggplot2, geom_hline and facet_grid

2011-01-19 Thread Sandy Small
sn't seem to make any difference if I get the mean and difference separately. Can anyone explain this and tell me how to avoid it (and why does it work with the Diamonds data set? Any help much appreciated - thanks. Sandy Sandy Small Clinical Physicist

[R] Comparing samples with widely different uncertainties

2010-08-25 Thread Sandy Small
a difference but it cannot include that uncertainty data). Can anybody suggest what I should be looking at? Is there a language here that I don't know? How do I do it in R? Many thanks for your help Sandy -- Sandy Small Clinical Physicist NHS Greater Glasgow and Clyde and NHS Forth Valley

Re: [R] Plotting ordered nominal data

2008-08-04 Thread Sandy Small
n implies "I'm not here at all" while NA says "I exist but I'm a missing value". For an example of when it might matter, try length(c(1,2,NULL,3)) #versus length(c(1,2,NA,3)) Steve E Sandy Small [1]<[EMAIL PROTECTED]> 01/08/2008 16:21:29 >>> Hi I

[R] Plotting ordered nominal data

2008-08-01 Thread Sandy Small
Hi I'm sure this question has been asked before but I can't find it in the archives. I have a data frame which includes interval and ordered nominal results. It looks something like "Measured" "Eyeball" 46.5 Normal 43.5 Mild 56.2 Normal 41.1 Mild 37.8 Moderate 12.6 Severe 17.3

Re: [R] Normalizing grouped data in a data frame

2007-11-09 Thread Sandy Small
Thank you very much. That works nicely. The trick I particularly needed was "within"which I didn't know about. Also nice to get a data frame out with "sparseby" instead of just a mulit-array with "by" Sandy Duncan Murdoch wrote: > Sandy Small wrote: >&g

[R] Normalizing grouped data in a data frame

2007-11-09 Thread Sandy Small
I would be very grateful. Sandy Small NHS Glasgow, UK ** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or