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

I was practicing using R programming in Proc IML, specifically with loading an Excel file through R in Proc IML and then reading it back to the SAS session to work on via SAS. The program I have written does this correctly, but it produces a warning message as follows:

WARNING: R: - | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \

This happens appears to be happening when I write the code to read in the Excel file. For reference, my SAS code is the following:

*Assign macro variables;
%let filepath = C:\\datafolder\\Input Table.xlsx;
%let sheet_name = Part 1; *Start proc iml; proc iml; path = "&filepath.";
sheet_select = "&sheet_name.";
submit path sheet_select/ R; /*Start R Session*/

#Load Packages
library(readxl)

table <- read_excel("&path1", sheet = "&sheet_select", skip = 2)

endsubmit;
call ImportDataSetFromR("output_table","table");

quit;

I don't think this is a data issue because I don't get this error when I run the program in R Studio. Additionally, the actual dataset comes back fine, there's just this error that comes up with it and I have no idea what it means.

 

Note: I'm aware of methods to read in Excel files just using SAS with proc import and the like. I'm mainly doing it this as way in order to practice using R code in SAS via Proc IML. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Agree with @ballardw 

While R is loading a file, depending on the code used, you get the progress bar showing in the console and that's what's being shown there. 

 

View solution in original post

4 REPLIES 4
ballardw
Super User

That looks like the text sequence for an "in progress" indicator, i.e. text equivalent of a spinning wheel.

Reeza
Super User

Agree with @ballardw 

While R is loading a file, depending on the code used, you get the progress bar showing in the console and that's what's being shown there. 

 

alwayslearning
Calcite | Level 5
Ahh, that makes sense. Is there any way to suppress the warning or is it just something I need to accept if I wish to use this piece of code?
Reeza
Super User

I took a quick look through the documentation and didn't see an option to suppress the status in the console. So I think you need to accept it if you want to use this specific code. However, not all all R packages generate this type of progress bar so using a different package to import XL may avoid the issues (but in my experience you usually get other issues).

 

https://community.rstudio.com/t/unwanted-console-output-from-readxl/36738

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
  • 4 replies
  • 544 views
  • 5 likes
  • 3 in conversation