Can anyone please tell me how to select only numeric or character variables?
Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)
|
2
|
|
|
|
|
5
|
If you are trying to create a dataset selecting only the variables that are character (or numeric) you can use the keep statement with char or numeric respectively. Here's an example with the SAS class dataset:
|
|||
|
|
|
3
|
If you want to know whether the variable itself is a numeric or character type you can use the c.f. http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000148439.htm ; it has a fuller explanation and some code examples. If you are trying do determine whether the content of the variable for a particular observation is numeric or character you can use the Run; |
|||
|
|