BookmarkSubscribeRSS Feed
etsfor
Calcite | Level 5

I am using a SAS Studio On Demand for Academics and upload a Excel file to File and Folder. The Excel file has some numerical and categorical variable (using numbers).

When I am create a SAS Table by using:

Options validvarname=v7;

Libname Cedrela xlsx "path....";

 

My SAS Table consider all variables as numeric variable. Moreover, when I am try to build a Categorical plot (e.g. box plot) by Task and Utilities its not possible because all variable is a numeric.

 

My I use a Proc step to format the variable or at Excel is possible do classify the variable?

 

2 REPLIES 2
SASKiwi
PROC Star

From experience I've found that if you do a "Data / Text to Columns" on the Excel columns you want treated as text / categorical, then reread the sheet into SAS that should fix your problem.

Reeza
Super User

Is it possible you have that backwards?

 

Variables to be summarized mathematically must be numeric variables. Variables to be used as categories can be either numeric or character and it wouldn't matter to the procedure. 


Please provide more details about the issues you're encountering. 

 

A box plot would require at least one continuous variable which should be numeric. You could have multiple plots then split by category which could be either a character or numeric variable AFAIK.

 


@etsfor wrote:

I am using a SAS Studio On Demand for Academics and upload a Excel file to File and Folder. The Excel file has some numerical and categorical variable (using numbers).

When I am create a SAS Table by using:

Options validvarname=v7;

Libname Cedrela xlsx "path....";

 

My SAS Table consider all variables as numeric variable. Moreover, when I am try to build a Categorical plot (e.g. box plot) by Task and Utilities its not possible because all variable is a numeric.

 

My I use a Proc step to format the variable or at Excel is possible do classify the variable?

 


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 2 replies
  • 542 views
  • 0 likes
  • 3 in conversation