The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 random reordering of the data on a column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
coll@inia. Posted - 12/29/2014 : 07:13:22 AM
Origin Ver.8.5 and Service Release (Select Help-->About Origin):
Operating System:win 7
Anyone knows how to reorder the existing data in a column (15000 rows) randomly?
I also need to repeat that reordering n times to obtain random means and sd values for each row data

I need that to calculate probabilities for each row value........

I did not find any function or help in the forums

thanks julio
4   L A T E S T    R E P L I E S    (Newest First)
coll@inia. Posted - 12/30/2014 : 12:50:45 PM
REALLY FANTASTIC!!!

that was really fast and convinient.

Thank you very much and have a HAPPY NEW 2015!!

julio
lkb0221 Posted - 12/29/2014 : 4:08:57 PM
Hi,
Please try the following sample:

// Start
// Assume the dataset is the 2nd column, and the random number is in 4th one in [book1]Sheet1
range rr = [Book1]Sheet1!;
sort.c1 = 2;
sort.c2 = 2;
sort.r1 = 1;
sort.r2 = rr.nrows;
sort.cName1$ = A: D;
sort.wksName$ = [Book1]Sheet1!;
sort.wks();
// End



Zheng
OriginLab
coll@inia. Posted - 12/29/2014 : 3:24:27 PM
Thank you Zheng!
simple and smart idea! and above all it looks like it worked beautifully!!!!

two minor points:
1) if I am not mistaken, the final sorting it is best done by including only the columns with the old values rather than with the whole worksheet. That allows to maintain the order of the rest of the data (gene names, accesion numbers, etc) and change their values only in a random way.

2) it will be time consuming to make even 4 variations, perhaps could be it automated? any simple ideas?

nevertheless, I found the idea very ingenious

Thank you again & Merry Christmas!
julio
lkb0221 Posted - 12/29/2014 : 2:40:20 PM
Hi,

You can create a new column beside it, fill this new column with random data and sort the worksheet by it.

Zheng
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000