Skip to content
Prev 371481 / 398506 Next

List of occuring values

Hi Ferri,
Do you mean getting something like the vector of original values back?

boodat<-sample(LETTERS[1:4],100,TRUE)
bootab<-table(boodat)
untab<-function(x) {
 lenx<-length(x)
 newx<-NULL
 for(i in 1:lenx) newx<-c(newx,rep(names(x)[i],x[i]))
 return(newx)
}
untab(bootab)

Jim
On Thu, Sep 21, 2017 at 11:01 PM, Ferri Leberl <ferri.leberl at gmx.at> wrote:
Message-ID: <CA+8X3fXo23v5br4=e75TYJmPaccgC5mT_WBWi=w5=npcqqMx+g@mail.gmail.com>
In-Reply-To: <trinity-5a6447af-3a31-4b0c-88d1-0d7da705991e-1505998883548@3c-app-gmx-bs68>