Re: [R] Cluster mapping data

2015-03-08 Thread Leask, Graham
is not knowledge. And knowledge > is certainly not wisdom." > Clifford Stoll > > > > >> On Sun, Mar 8, 2015 at 9:58 AM, Leask, Graham wrote: >> I am looking to cluster some data including a postcode shape file but need >> to ensure that the resulting groups

[R] Cluster mapping data

2015-03-08 Thread Leask, Graham
I am looking to cluster some data including a postcode shape file but need to ensure that the resulting groups are contiguous. How do I accomplish this using R? Kind Regards Dr Graham Leask Economics & Strategy Group Aston University Aston Triangle Birmingham B4 7ET Tel: 0121 204 3150

Re: [R] Area Graphs

2014-07-16 Thread Leask, Graham
nformation are you trying to convey/explore using area graphs? > There is probably a better tool or set of tools to use. > > > On Wed, Jul 16, 2014 at 7:51 AM, Leask, Graham wrote: >> Area graphs are a commonly used graphic in such software as Excel but I have >> been unab

Re: [R] Area Graphs

2014-07-16 Thread Leask, Graham
ph" r > > Since you claim to be "unable to find" anything relevant, maybe you > mean something different? If so, you'll need to be clearer, and > ideally link to an example. > > Sarah > > On Wed, Jul 16, 2014 at 9:51 AM, Leask, Graham wrote: >

[R] Area Graphs

2014-07-16 Thread Leask, Graham
Area graphs are a commonly used graphic in such software as Excel but I have been unable to find any examples of their use using R. Is there a way to produce good quality area graphs in R? If so I would greatly appreciate being directed to the relevant package or a code example. Any help will b

[R] Mlogit error

2013-04-08 Thread Leask, Graham
Dear Listmembers Thank you for your help in resolving the duplicate row.names error. The solution was very straightforward to ensure that the choice set is completely balanced. Once that was achieved the program worked fine. Kind Regards Graham __ R

[R] mlogit error

2013-04-07 Thread Leask, Graham
Dear List I am trying to fit a multinomial model using the mlogit package. Attempting to load the data into mlogit presents the following error. MLOG<-mlogit.data(Mult3,shape="long",choice="CHOICE",alt.var="mode.ids",indivs = "set3",chid.var = "obs") Error in `row.names<-.data.frame`(`*tmp*`, v

Re: [R] Replace missing value within group with non-missing value

2013-04-07 Thread Leask, Graham
but this should have been detected at the data cleaning stage. Best wishes Graham -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: 06 April 2013 22:49 To: Rui Barradas; Leask, Graham Cc: r-help@r-project.org Subject: RE: [R] Replace missing value within group with

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
Hi Arun, Thank you to yourself and Rui. The solution that you provided does indeed work. I greatly appreciate your help. Best wishes Graham -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: 06 April 2013 19:20 To: Leask, Graham Cc: R help; Rui Barradas Subject: Re

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
call(rbind,tmp) Error in do.call(rbind, tmp) : object 'tmp' not found Any thoughts on what could be causing this anomaly? -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 06 April 2013 18:24 To: Leask, Graham Cc: arun; r-help@r-project.org Subject: Re: [R

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
1 1 6 487 Best wishes Graham -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: 06 April 2013 17:46 To: David Winsemius Cc: Leask, Graham; r-help@r-project.org Subject: Re: [R] Replace missing value within group with non-missing value On Apr 6, 2013, a

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
;, "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"), class = "data.frame") > sp <- split(dat, list(dat$dn, dat$obs)) > names(sp) <- NULL > tmp <- lapply

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", &q

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
0 4 NA 47 4 8 0 5 NA 48 4 8 1 6 491 49 4 9 0 1 NA 50 4 9 0 2 NA Best wishes Graham -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: 06 April 2013 16:32 To: Leask, Graham Cc: r-help@r-project.org Subject: Re: [R

Re: [R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
; dat$mth[18] <- 488 > dat$mth[21] <- 489 > dat$mth[30] <- 489 > > > sp <- split(dat, list(dat$dn, dat$obs)) > names(sp) <- NULL > tmp <- lapply(sp, function(x){ >idx <- which(!is.na(x$mth))[1] >x$mth <- x$mth[idx] >x &

[R] Replace missing value within group with non-missing value

2013-04-06 Thread Leask, Graham
Dear List members I have a large dataset organised in choice groups see sample below +-+ | dn obs choice acid br date cdate situat~n mth year set |