BookmarkSubscribeRSS Feed
yoyong
Obsidian | Level 7

Hi everyone.

 

I need help with data cleaning.

 

I have attached a sample data set with the following variables:

 

OBSLN_LOC_P1_1LN_LOC_P1_2LN_LOC_P1_3LN_LOC_P1_4LN_TREAT_P1_1LN_TREAT_P1_2   
     
  

 

LN_TREAT_P1_3LN_TREAT_P1_4LN_LENGTH_P1_1LN_LENGTH_P1_2LN_LENGTH_P1_3LN_LENGTH_P1_4

 

 


LN_LOC variables have 6 choices (1 - 6).

LN_TREAT variables have 4 choices (1 - 4).

 

LN_LENGTH variables represent dimensions.

 

From this data set, I just need the LENGTHS of OBSERVATIONS with LN_LOC = 6 AND LN_TREAT = 4.

 

Thank you for your help.

 

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

1. Many people (including myself) will NOT download Microsoft files.

Please provide your data as part of your post:

How to convert datasets to data steps
How to post code

 

2. Please also provide the expected output.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 658 views
  • 0 likes
  • 2 in conversation