Re: [R] [r] How to pick colums from a ragged array?

2012-10-26 Thread Stuart Leask
Many thanks! Stuart -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: 26 October 2012 13:54 To: Stuart Leask Cc: R help; Petr PIKAL Subject: Re: [r] How to pick colums from a ragged array? Hi Stuart, I guess, this should do it. fun1H<-function(dat){ res1H

Re: [R] [r] How to pick colums from a ragged array?

2012-10-26 Thread Stuart Leask
INCLUDE.FIRST), then on a separate run to consider the last date (to produce e.g. INCLUDE.LAST). -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: 25 October 2012 12:32 To: Stuart Leask Cc: R help; Petr PIKAL Subject: Re: [r] How to pick colums from a ragged array? Hi

Re: [R] [r] How to pick colums from a ragged array?

2012-10-24 Thread Stuart Leask
o.com] Sent: 24 October 2012 21:30 To: Rui Barradas Cc: R help; Stuart Leask Subject: Re: [r] How to pick colums from a ragged array? Hi, According to the OP "So the function should only exclude an ID, having identified a first (or last) DATE duplicate, the DGs for these two dates are differe

Re: [R] FW: [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
So I get my list of IDs to exclude from: g.rr<-do.call(rbind, g.r)[1] dim(g.rr) g.rr[1:(dim(g.rr)[1]/2)] Many thanks. Stuart -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 23 October 2012 13:42 To: Stuart Leask Cc: r-help@r-project.org Subject: Re: FW:

[R] FW: [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
pply ( DATE, ID, min)# table of earliest DATEs rownames (earliest [earliest %in% nd.b ] ) # IDs of duplicates at the earliest date for that individual. I think... ** -Original Message- Fr

Re: [R] [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
ates, they are not the first date. -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: 23 October 2012 14:29 To: Stuart Leask Cc: R help Subject: Re: [R] [r] How to pick colums from a ragged array? Hi, Also one more thing: This should get the dates which are duplicated. In

Re: [R] [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
"167" "841" "1019" Stuart -Original Message- From: PIKAL Petr [mailto:petr.pi...@precheza.cz] Sent: 23 October 2012 13:15 To: Stuart Leask; r-help@r-project.org Subject: RE: [r] How to pick colums from a ragged array? Hi Rui's answer brought me to m

Re: [R] [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
of earliest DATEs rownames (earliest [earliest %in% nd.b ] ) # IDs of duplicates at the earliest date for that individual. I think... ** -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 23 October

Re: [R] [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
******** -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 23 October 2012 12:21 To: Stuart Leask Cc: r-help@r-project.org Subject: Re: [R] [r] How to pick colums from a ragged array? Hello, Thinking again, if you just want the fi

[R] [r] How to pick colums from a ragged array?

2012-10-23 Thread Stuart Leask
.le...@nottingham.ac.uk<mailto:stuart.le...@nottingham.ac.uk> Google 'Dr Stuart Leask' ID <- c(58,58,58,58,167,167,323,323,323,323,323,323,323 ,547,794,814,814,814,814,814,814,841,841,841,841,841 ,841,841,841,841,910,910,910,910,910,910,999,1019,1019 ,1019) DATE <- c(

Re: [R] 'symbols' not plotting correct circle radii

2012-07-19 Thread Stuart Leask
You're right - easily tested by just re-sizing the graphics box - sort of counter-intuitive until I remember the clue is in the name - this generates a CIRCLE, come what may... Stuart From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: 19 July 2012 11:18 To: Stuart Leask Cc: r-h

Re: [R] 'symbols' not plotting correct circle radii

2012-07-19 Thread Stuart Leask
correct on X axis, but too large on the Y axis.) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stuart Leask Sent: 18 July 2012 11:03 To: r-help@r-project.org Subject: [R] 'symbols' not plotting correct circle radii Hi

Re: [R] 'symbols' not plotting correct circle radii

2012-07-19 Thread Stuart Leask
(Oh, and yes I've tried setting 'inches=F', but I then get a circle correct on X axis, but too large on the Y axis.) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stuart Leask Sent: 18 July 2012 11:03 To: r-hel

[R] 'symbols' not plotting correct circle radii

2012-07-18 Thread Stuart Leask
Hi there. I have been plotting some circles using 'symbols', with radii representing my data, but the radii looked incorrect. It seems to happen with a single circle too: Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40)) If I put a ruler up to my monitor (technology!) to co

Re: [R] removing NA from a data frame

2012-06-22 Thread Stuart Leask
Stuart Dr Stuart John Leask DM FRCPsych MB Mchir Clinical Senior Lecturer and Honorary Consultant Pychiatrist Institute of Mental Health, Innovation Park Triumph Road, Nottingham, Notts. NG7 2TU. UK Tel. +44 115 82 30419 stuart.le...@nottingham.ac.uk<mailto:stuart.le...@nottingham.ac.

[R] can't find 'predict.loess' in a loop

2011-12-22 Thread Stuart Leask
Season's Greetings. I am using 'predict' in a loop, but it is behaving unexpectedly, so I am more explicit and use 'predict.loess', and R says it can't find it. Even if I explicitly load the stats library, which is already in the search path. Any ideas? This is odd, because if I use RB & LB f

[R] colouring locfit bands

2010-04-30 Thread Stuart Leask
fy for the locally-fitted estimate line? Stuart Dr Stuart J Leask DM FRCPsych MA BChir Clinical Senior Lecturer and Honorary Consultant in Clinical Psychiatry University Dept of Psychiatry, A Floor, Queen's Medical Centre, Nottingham. NG7 2UH www: Google "Dr Stuart Leask" This mes

[R] How can I generate a random order?

2008-11-12 Thread Stuart Leask
Floor, Queen's Medical Centre, Nottingham. NG7 2UH www: Google "Dr Stuart Leask" This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks.

[R] R loess vs. Matlab loess

2008-01-30 Thread Stuart Leask
ultant in Clinical Psychiatry University Dept of Psychiatry, Duncan Macmillan House Porchester Road. Nottingham. NG3 6AA. www: Google "Dr Stuart Leask" ** 'SMOOTH Smooth data. Z = SMOOTH(Y) smooths data Y using a 5-poi