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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 820 views
  • 5 likes
  • 3 in conversation