count variable

Reply
Contributor
Posts: 67

count variable

Hello 

 

I'm looking for code that can count how many herds in my dataset MFD. 

Each herd repeated in the original dataset many times. And this table is the output of proc freq of Herd. 

this table is very long because of a large number of farms.

 

HOW CAN I KNOW THE NUMBER OF FREQUENCES?

 

Herd 

A40

A56

A005

A025

A041

A115

A131

A143

A223

A376

 

REGARDS 

Super User
Posts: 9,933

Re: count variable

From the original table, do a count(distinct herd) in sql.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 23,357

Re: count variable

Ask a Question
Discussion stats
  • 2 replies
  • 115 views
  • 0 likes
  • 3 in conversation