BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jonesj22
Calcite | Level 5

Hello,

 

I am trying to run some text analytics in SAS Enterprise Miner. I have a dataset with about a dozen different text variables that I would like to analyze, as well as target variable. I would like to concatenate all individual text variables into one single variable and then run that through a parsing node, and so on. I have tried doing this in Enterprise Guide but there's some sort of character limit that is cutting off my string when I concatenate them all together. So, I thought I'd export my dataset into Miner then concatenate them there, but am unsure how to do that. I thought the right move was to use the merge node, but I clearly haven't figured it out yet since no new concatenated variable with all my strings is being exported from the node.

 

Essentially, I am trying to turn this:

 

Target     var_1     var_2     var_3

    1         "text1 "    "text2 "   "text3 " 

    0         "text4 "    "text5 "   "text6 "

    0         "text7 "     "text8 "  "text9 "

 

into this:

 

Target             all_text

    1         "text1 text2 text3 "

    0         "text4 text5 text6 "

    0         "text7 text8 text9 "

 

 

Can anyone help me achieve this? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
SHould work fine in EG just make sure to set the length of hte variable ahead of time.

data want;
set have;
length new_col $2000.;

new_col = catx(" ", of var_1-var_3);

run;

View solution in original post

2 REPLIES 2
Reeza
Super User
SHould work fine in EG just make sure to set the length of hte variable ahead of time.

data want;
set have;
length new_col $2000.;

new_col = catx(" ", of var_1-var_3);

run;

jonesj22
Calcite | Level 5
Yep, this did the trick. Cheers!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1018 views
  • 0 likes
  • 2 in conversation