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

I am fairly new to SAS Studio as this is my first semester using it in college. I am getting four warning errors that say WARNING: Apparent symbolic reference MS not resolved when I try and run my code for a Boxplot and Histogram on two separate pieces of data. I have provided my code down below as well as the homework question they correspond with; any help on question 5 and 9 would be appreciated as to how to get this warning to go away. Thank you very much!

 

5. Include the following PROC SGPLOT SAS code (below the Question 5 header)

NOTE:  Replace the Your Name text in the TITLE2 statements with your actual first and last names

 

PROC SGPLOT DATA=MMS;

HISTOGRAM MMS;

TITLE "Histogram of M&Ms Eaten";

TITLE2 "Your Name";

RUN;

PROC SGPLOT DATA=MMS;

VBOX MMS;

TITLE "Boxplot of M&Ms Eaten";

TITLE2 "Your Name";

RUN;

 

9. Do the following relative to Exploratory Data Analysis for the variable Error:

 

  1. [1.1] Precede the SAS code with comment header /* Question 9 */
  2. Copy the prior PROC SGPLOT code (from Question 5b) and paste it below the section header; adapt it to generate both a histogram and a boxplot for the variable MMsError (adapting may mean changing a title too)

Screen Shot 2020-09-25 at 9.19.53 PM.pngScreen Shot 2020-09-25 at 9.20.08 PM.pngScreen Shot 2020-09-25 at 9.20.21 PM.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

In the code that generates the warning you are using double quote characters.

TITLE "Histogram of M&Ms Eaten";

In similar code in the pictures you posted you have a label statement that is using very similar text that does not produce the warning.  Notice how that code is using single quote characters instead of double quote characters.

 

The & is the trigger for the macro processor to replace macro variable references.  But the macro processor ignores text that is inside of single quotes.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

In the code that generates the warning you are using double quote characters.

TITLE "Histogram of M&Ms Eaten";

In similar code in the pictures you posted you have a label statement that is using very similar text that does not produce the warning.  Notice how that code is using single quote characters instead of double quote characters.

 

The & is the trigger for the macro processor to replace macro variable references.  But the macro processor ignores text that is inside of single quotes.

autumnhxlvorsen
Calcite | Level 5

Thank you so much! I can't believe the solution was that simple.