Search String: Display: Description: Sort:

Results:

References: [ +subject:/^(?:^\s*(re|sv|fwd|fw)[\[\]\d]*[:>-]+\s*)*Random\s+\"shuffling\"\s+of\s+a\s+dataframe\s+based\s+on\s+a\s+column\s*$/: 2 ]

Total 2 documents matching your query.

1. Random "shuffling" of a dataframe based on a column (score: 1)
Author: "Khan, Sohail" <khan@cshl.edu>
Date: Tue, 26 Jul 2005 10:48:58 -0400
Dear List, Is there a way to "shuffle" a data frame based on a column. I.E. if the data frame looks like: pos ratio 1 0.2356 2 0.5236 3 1.2356 4 2.5690 I would like to randomly shuffle based on colum
/archives/html/s-news/2005-07/msg00136.html (7,490 bytes)

2. Re: Random "shuffling" of a dataframe based on a column (score: 1)
Author: Mario Cortina Borja <M.Cortina@ich.ucl.ac.uk>
Date: Tue, 26 Jul 2005 16:06:26 +0100
Dear Sohail, df1[ sample(1:dim(df1)[1]), ] does that, Best wishes, Mario Is there a way to "shuffle" a data frame based on a column. I.E. if the data frame looks like: pos ratio 1 0.2356 2 0.5236 3 1
/archives/html/s-news/2005-07/msg00137.html (8,402 bytes)


This search system is powered by Namazu