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
 Origin Forum
 find in columns

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
Matrices_stack Posted - 04/06/2021 : 05:40:28 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
Origin Pro2018 (64-bit) SR1, b9.5.1.195

Hi guys,
I have a column, that randomly contains three different words. For example:
cat
cat
dog
rabbit

I would like to run a small code (e.g. LabTalk), which gives me "1" for cat, "2" for dog and "3" for rabbit"
cat 1
cat 1
dog 2
rabbit 3

Could you please help me with such a command? I don't know how to deal with words in origin.

Best wishes,
Alisa


5   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 04/06/2021 : 12:21:25 PM
This should work: int(A)
Matrices_stack Posted - 04/06/2021 : 10:52:22 AM
quote:
Originally posted by YimingChen

Try catindex() function to set column value:



James



No, it does not work as well. It tells this function is unknown:
YimingChen Posted - 04/06/2021 : 10:34:36 AM
Try catindex() function to set column value:



James
Matrices_stack Posted - 04/06/2021 : 10:27:13 AM
quote:
Originally posted by YimingChen

You can copy it to a new column, then:
1. Click the column header, in the pop-up mini toolbar, choose Categorical.
2. Click on the edge of the worksheet, choose Show Category Indices in the worksheet mini toolbar.


The script can be:

colcopy irng:=1 orng:=2;
wks.col2.ISCAT=1;
wks.CATI=1;


James



Thank you for your reply.
I set the column as categorical, but I cannot access the Category Infices.
That probably works for Origin 2020. Unfortunately, I have Origin Pro2018 and don't know how to access the choose Show Category Indices.
YimingChen Posted - 04/06/2021 : 09:44:37 AM
You can copy it to a new column, then:
1. Click the column header, in the pop-up mini toolbar, choose Categorical.
2. Click on the edge of the worksheet, choose Show Category Indices in the worksheet mini toolbar.


The script can be:

colcopy irng:=1 orng:=2;
wks.col2.ISCAT=1;
wks.CATI=1;


James

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