Re: [R] Persons with objects –> Objects and persons

2015-03-16 Thread David Winsemius
On Mar 15, 2015, at 3:46 AM, Jim Lemon wrote: > Hi mareki, > The transformation is not too difficult, but the table format in your > example will cause a bit of difficulty. The following function from the > plotrix package: > > categoryReshape<-function(x) { > dimx<-dim(x) > if(is.null(dimx) ||

Re: [R] Persons with objects –> Objects and persons

2015-03-15 Thread Marek Lutonský
Hi Jim, thank you very much for the code. Marek On Sun, Mar 15, 2015 at 11:46 AM, Jim Lemon wrote: > Hi mareki, > The transformation is not too difficult, but the table format in your > example will cause a bit of difficulty. The following function from the > plotrix package: > > categoryResh

Re: [R] Persons with objects –> Objects and persons

2015-03-15 Thread John Kane
:55 -0700 (PDT) > To: r-help@r-project.org > Subject: [R] Persons with objects –> Objects and persons > > Hi, > > I have a table with persons in rows and objects associated to these > persons. > And I need to transform it to table with objects in rows and persons nex

Re: [R] Persons with objects –> Objects and persons

2015-03-15 Thread Jim Lemon
Hi mareki, The transformation is not too difficult, but the table format in your example will cause a bit of difficulty. The following function from the plotrix package: categoryReshape<-function(x) { dimx<-dim(x) if(is.null(dimx) || dimx[2]==1) stop("Can only reshape a matrix or data frame wi

[R] Persons with objects –> Objects and persons

2015-03-14 Thread marekl
Hi, I have a table with persons in rows and objects associated to these persons. And I need to transform it to table with objects in rows and persons next to them. As it is shown on the picture. Can you please help me how to