03-07-2025
Bill_in_Toronto
Obsidian | Level 7
Member since
06-23-2011
- 20 Posts
- 19 Likes Given
- 1 Solutions
- 7 Likes Received
-
Latest posts by Bill_in_Toronto
Subject Views Posted 318 03-03-2025 12:58 PM 1692 02-18-2021 10:41 AM 2020 08-27-2019 09:16 PM 4004 10-29-2015 09:04 AM 4026 10-28-2015 10:29 PM 2148 04-01-2015 10:11 AM 1458 10-28-2013 09:17 PM 3501 02-22-2013 09:16 AM 2575 11-06-2012 08:30 PM 2975 11-06-2012 11:57 AM -
Activity Feed for Bill_in_Toronto
- Liked Re: In Analytics Pro, enhance the Open command in Studio for SylvainTremblay. 03-07-2025 02:03 PM
- Got a Like for In Analytics Pro, enhance the Open command in Studio. 03-07-2025 09:26 AM
- Liked Auto-completion for variables in SAS Studio for Sofiest. 03-07-2025 07:28 AM
- Liked Search within file contents in SAS Studio for robert08. 03-07-2025 07:27 AM
- Posted In Analytics Pro, enhance the Open command in Studio on SAS Product Suggestions. 03-03-2025 12:58 PM
- Tagged In Analytics Pro, enhance the Open command in Studio on SAS Product Suggestions. 03-03-2025 12:58 PM
- Tagged In Analytics Pro, enhance the Open command in Studio on SAS Product Suggestions. 03-03-2025 12:58 PM
- Liked Import Excel Table using proc import for GeorgeBonanza. 03-03-2025 12:43 PM
- Liked Add option to suppress PROC PRINT output from data sets with 0 rows for miclar. 01-21-2025 02:53 PM
- Liked SAS Studio Drag and Drop confirmation or disabling for syrovd. 01-21-2025 02:51 PM
- Liked Re: Improve the Performance of ODS EXCEL destination for large tables for KentL. 03-27-2024 12:47 PM
- Liked Improve the Performance of ODS EXCEL destination for large tables for pchegoor. 03-27-2024 12:47 PM
- Liked Re: Excel text field to SAS date-time conversion for Tom. 04-10-2022 08:55 AM
- Got a Like for Re: Remove space around a PDF image. 01-31-2022 06:16 AM
- Got a Like for Support BY group annotation in SG. 12-03-2021 02:09 PM
- Liked Feature request: Display variables' names in a tab for ammarhm. 12-03-2021 02:03 PM
- Liked Option to save the LOG Summary to a dataset for j0andre1. 12-03-2021 02:02 PM
- Posted Support BY group annotation in SG on SASware Ballot Ideas. 12-03-2021 01:59 PM
- Tagged Support BY group annotation in SG on SASware Ballot Ideas. 12-03-2021 01:59 PM
- Liked Add DBSASTYPE or similar option to XLSX engine to force variable types for Quentin. 09-03-2021 11:14 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 2 3 4 6 -
My Liked Posts
Subject Likes Posted 1 03-03-2025 12:58 PM 1 02-18-2021 10:41 AM 2 12-03-2021 01:59 PM 1 08-27-2019 09:16 PM 2 10-28-2015 10:29 PM
03-03-2025
12:58 PM
1 Like
The program editor in Studio under Analytics Pro is missing key features that are present in 9.4. This request is to add two features in the "Open" window, as follows: 1. display file size, file type, and date modified. Allow sorting on any of these fields by clicking at the top of the respective column.
2. display the last X files that were opened. The number of displayed files should be configurable, and double-clicking on a file name should open it.
... View more
- Find more ideas tagged with:
- Analytics Pro
- studio
See more ideas labeled with:
02-18-2021
10:41 AM
1 Like
Here are the ODS graphics options I use most often. The height and width options may address your issue. I find that imagefmt=PDF results in better looking plots, but the resulting file size can be much larger than imagefmt=PNG, depending on the number of data points.
ODS GRAPHICS ON/reset border = off antialiasmax=1000000 height = 100pct width = 100pct imagefmt=PDF;
... View more
08-27-2019
09:16 PM
1 Like
Thanks for the suggestions. I selected the image of box plot elements, saved it on my pc, and inserted the image on a separate page in my PDF file containing box plots, using the following approach:
ODS _ALL_ CLOSE;
OPTIONS NODATE NONUMBER;
ODS PDF FILE='c:\temp\testimage.pdf' STYLE=Dove PDFTOC=1 ;
ODS PROCLABEL "BoxPlotDescription";
ODS NOPROCTITLE ;
PROC GSLIDE
IFRAME='c:\temp\Box_Key_SG.png'
IMAGESTYLE = FIT
DESCRIPTION = 'Box Plot - Description';
TITLE1 'Box Plot: Description' J=r H=1 "&sysdate9";
RUN;
QUIT;
ODS PDF CLOSE;
... View more
10-29-2015
09:04 AM
Thanks for your thoughtful reply. In my situation I have little to no influence on data originators. I can’t ask too much of them because they generally have limited resources, e.g., software and training for tools such as MS Access. I get the data for free, and I too have limited resources. I want to avoid the requirement for a special version of their data files just for me. There’s risk in asking data originators to perform tasks such as copy/paste, and the possibility of file versioning errors when saving a copy in CSV. So far I haven’t encountered a “fatal flaw” in this approach, as far as I know. I encourage data originator to follow best practices, such as using consistent and meaningful column names, providing metadata such as units, formatting numeric fields, and using the ISO format for dates. I agree that this approach results in “a bit of a manual process”, as it’s a bother to create a control file for each source of data, but I think it results in higher data integrity where the data originator uses Excel. This program can be easily modified to work with CSV files, and this is on my list of future enhancements.
... View more
10-28-2015
10:29 PM
2 Likes
I've noticed that there are many postings here about inconsistent or unexpected results when using PROC IMPORT with Excel. I would like to share a program I've written that address these problems. The trick is to force all columns to be imported as character by using the GETNAMES=NO option in PROC IMPORT, and then in a data step to convert each variable to its proper format. The catch is that you need to create a control worksheet that lists each variable name and its desired format. The program was presented at a meeting of the Toronto SAS user group. See TORSAS Web Site "Importing Excel into SAS: A Robust Approach for Difficult-To-Read Worksheets" . E-mail me if you would like a copy of the program.
bill.sukloff@ec.gc.ca
... View more
- Tags:
- excel
- PROC IMPORT
04-01-2015
10:11 AM
My solution: 1. Import Excel worksheet with all columns as character by using the MIXED and GETNAMES options. For example: PROC IMPORT DATAFILE='...' OUT=rawdata_character DBMS=EXCEL REPLACE; SHEET="..." MIXED=YES; GETNAMES=NO; RUN; 2. Assuming that the row of column headers is within the guessingrows range this technique will force all columns to be character. The SAS variable names will be F1, F2, F3, ... Note that the formatted value in each cell will be imported. e.g., value=5.1324234, formatted cell=5.13, SAS value=5.13. 3. In data steps find the row containing the column headers (hard code it if it's always the same row), read the headers into SAS macro variables, and loop through the macro variables to create a SAS numeric variable for each column. When reading the row of headers remove special characters in order to produce a valid SAS name. When converting character to numeric (e.g., numeric_name = INPUT(character_name,BEST.) check if the conversion was successful (if character_name NE '' and numeric_name = . then conversion failed) and output unsuccessful conversions to a data file for further investigation. You can enhance the data steps to handle issues such as inconsistent column header names by using a crosswalk mapping of each name to a standard name. Bill.
... View more
10-28-2013
09:17 PM
Hi: Has anyone produced a wind rose plot using ODS graphics? PROC GRADAR's wind rose option is limited and buggy. I'm looking for a parameter-driven version that's similar to either of the two examples below. Thanks. Examples: http://robslink.com/SAS/democd17/wind.htm http://en.wikipedia.org/wiki/File:Wind_rose_plot.jpg
... View more
02-22-2013
09:16 AM
Hi: Just wondering if you noticed the posting https://communities.sas.com/thread/38666. It shows how you can build on Robert's code in the reply above to include information other than a link in a mouse over. Bill.
... View more
11-06-2012
08:30 PM
Hi Arthur: Sure, thanks for the offer.
... View more
11-06-2012
11:57 AM
Hi: I would like to share a technique I discovered for producing mouseover text in PDF files created by PROC GPLOT. In SAS 9.2 the PROC GPLOT option “HTML=” was introduced. This option allows plotted symbols to link to an HTML destination. The technique shown in the program below manipulates this option to provide a mouseover feature similar to that available in ODS HTML. The output PDF file is attached. * Author: Bill Sukloff; * Date: 2012-11-06 * Description: For PDF files, uses the option introduced in SAS 9.2 GPLOT of "HTML=" to display text when the mouse hovers over a plotted symbol; * Caution: this feature may not work in some PDF readers (tested only in Adobe Reader); DATA class_with_anno; SET sashelp.class; LENGTH anno_link $ 30; * Normally you start the href text string with "http:". I found that replacing "http:" with ">:" looked nice and still resulted in the Adobe Reader interpreting the text string as an HTML link; * Another option is to use a text string which simulates an arrow: "-->:"; IF name NE '' THEN anno_link = "href='>:"!!TRIM(LEFT(name))!!"'"; ELSE anno_link = "href='>:No name'"; RUN; OPTIONS orientation=landscape PAPERSIZE=legal NODATE NONUMBER; ODS HTML CLOSE; ODS LISTING CLOSE; ODS PDF FILE='c:\temp\sasgraph_pdf_example_mouseover.pdf' style=BarrettsBlue; TITLE1 'SAS/Graph: PDF Mouseover using fake HTML links'; FOOTNOTE1 'Note: Place your mouse cursor over a plot symbol for information about the data value'; PROC GPLOT DATA=class_with_anno; PLOT height * weight = sex / HTML=anno_link ; RUN; QUIT; ODS PDF CLOSE;
... View more
02-22-2011
11:32 AM
Hi:
I need to set the horizontal and vertical axis range to be "0 to 40 by 5" in a matrix plot. I suspect it can be done with PROC TEMPLATE, but I can't find an example for PROC SGSCATTER. I'm using 9.2 under Windows workstation. The program is shown below. Can anyone provide an example?
Thanks.
------------
PROC SGSCATTER DATA=alldata_samples ;
MATRIX egbpm_daily_aggr_bc_ugm3 egbpmea_bc_ugm3 egbpmes_bc_ugm3 egbtms1_raw_avg egbtms2_raw_avg egbsp1c_avg egbsp2c_avg egbtmf2_raw_avg
/
GROUP=season;
RUN;
QUIT;
... View more
- Tags:
- procedures
- sql
09-23-2010
09:32 AM
Hi:
I had problems getting the Graphics Template Language to work properly, so I created a new variable for the one-to-one line coordinates and added plotted it by adding a "series" statement to the SGPLOT and SGPANEL Procs. It works perfectly. The program is shown below. For now I've given up trying to get one-to-one lines on the PROC SGSCATTER / Matrix output.
------------------------------
ODS LISTING CLOSE;
GOPTIONS RESET=ALL ftext='Helvetica' ;
OPTIONS orientation=landscape papersize=letter nonumber nodate;
ODS graphics on/reset
border = off
height = 7.5in
width = 9in
;
ODS PDF file='c:\temp\pm_intercomparison_hourly_data.pdf' DPI=300 style=analysis;
TITLE1 'CAPMoN PM Intercomparison Study--Hourly' j=r h=.8 "&SYSDATE9";
TITLE2 ;
* Calculate the min/max of all observations (ignoring the BY variable) for each of the two plotting variables;
PROC MEANS DATA=alldata NOPRINT;
VAR egbbam1 egbbam2;
OUTPUT OUT=min_max(KEEP=min_var1 min_var2 max_var1 max_var2) min=min_var1 min_var2 max=max_var1 max_var2;
RUN;
* Create new variables to store the MIN and MAX values of the two variables.
Insert the MIN pairing on the first observation of the BY group, and the MAX pairing in the last observation of the BY group.;
DATA alldata_with_1_to_1;
SET alldata;
BY yr_month;
RETAIN one 1 _found 0;
IF FIRST.yr_month
THEN DO;
SET min_max POINT=one;
one_to_one_x = MIN(min_var1,min_var2);
one_to_one_y = one_to_one_x;
END;
IF LAST.yr_month
THEN DO;
SET min_max POINT=one;
one_to_one_x = MAX(max_var1,max_var2);
one_to_one_y = one_to_one_x;
END;
* Store the value of the first non-missing BY group variable in the macro variable first_by_variable_value;
IF yr_month NE ''
AND NOT _found
THEN DO;
CALL SYMPUTX('first_by_variable_value',yr_month);
_found = 1;
END;
LABEL one_to_one_y = '1-1 Line';
DROP min_var1 min_var2 max_var1 max_var2 _found;
RUN;
* For SGPLOT output where all BY groups are on one plot, include the one-to-one pairings only for the first BY group.;
DATA alldata_for_sgplot;
SET alldata_with_minmax;
IF yr_month NE "&first_by_variable_value"
THEN DO;
one_to_one_x = .;
one_to_one_y = .;
END;
RUN;
PROC SGPLOT DATA=alldata_for_sgplot;
series x=one_to_one_x y=one_to_one_y / lineattrs=(pattern=dot thickness=2px color=gray) ;
REG x=egbbam1 Y=egbbam2 / CLM GROUP=yr_month;
RUN;
QUIT;
PROC SGPANEL DATA=alldata_with_1_to_1;
PANELBY yr_month / columns=4 rows=4 uniscale=all ;
reg x=egbbam1 Y=egbbam2 ;
series x=one_to_one_x y=one_to_one_y / lineattrs=(pattern=dot thickness=2px color=gray) ;
RUN;
QUIT;
ODS PDF CLOSE;
ODS GRAPHICS OFF;
... View more
09-21-2010
08:41 AM
Just to clarify, by a one-to-one line in a scatter plot I mean a straight line going from the min(x1,x2) to max(y1,y2). For example,
min(x1,x2)=2,
max(y1,y2)=10,
one-to-one line = (2,2) to (10,10).
Ideally, the horizontal and vertical axis will have identical ranges and the plot area will be square, resulting in a line at 45 degrees. I guess I could determine the min and max in a PROC MEANS, and merge these values with the data set, but since the axis range is determined by the SG procedure, the line drawn by this method is not guaranteed to span the entire graph. I’m wondering if this can be accomlished using the Graph Template Language.
... View more
09-15-2010
03:57 PM
Hi:
I need to display the one-to-one line in output from the statistical graphics procs SGSCATTER (matrix), SGPANEL (reg), and SGPLOT (scatter). Is there any way to do this easily?
Thanks.
Bill.
... View more
09-15-2010
01:57 PM
Hi:
I need to display the one-to-one line in output from the statistical graphics procs SGSCATTER (matrix), SGPANEL (reg), and SGPLOT (scatter). Is there any way to do this easily?
Thanks.
Bill.
... View more