Re: [R] Reversing table()

2017-03-18 Thread David Winsemius
dtbl[ rep(row.names(dtbl), dtbl$Freq), ] str(xpd) -- Best. David. > > Cheers > Petr > >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kevin E. >> Thorpe >> Sent: Friday, March 17, 2017 1:23 PM >> To: r-help

Re: [R] Reversing table()

2017-03-17 Thread Mark Sharp
Kevin, The short answer is no. The function table() takes in the vectors provided as arguments, counts the number of occurrences of each category by adding the integer 1L to a bin (one for each category or factor level), and at the end it returns the counts in each bin. Since it does not retur

Re: [R] Reversing table()

2017-03-17 Thread PIKAL Petr
> To: r-help > Subject: [R] Reversing table() > > I am wondering if there is a way to undo the results of table(). > > For example if you had a table that looked like the result of table(x, y) or > table(x, y, z) is there a simple/elegant way to reverse the process to get th

[R] Reversing table()

2017-03-17 Thread Kevin E. Thorpe
I am wondering if there is a way to undo the results of table(). For example if you had a table that looked like the result of table(x, y) or table(x, y, z) is there a simple/elegant way to reverse the process to get the "original" x, y and z vectors? Thanks, Kevin -- Kevin E. Thorpe Head of