SASPAC-あるGithubアーカイブのご紹介-

>100 Views

October 21, 24

スライド概要

[第10回大阪sas勉強会]

profile-image

SAS言語を中心として,解析業務担当者・プログラマなのコミュニティを活性化したいです

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

SASPAC -あるGithubアーカイブのご紹介仲家 諒 (Nakaya Ryo) Takeda Pharmaceutical Company Statistical and Quantitative Science 18October2024 @ Osaka SASBen(大阪SAS勉強会)

2.

Agenda • Intro of SAS PACkage Archive in GitHub • SPF and 8 packages • Future with the open and shared SAS packages

3.

What is SASPAC? • SAS package repository in Github • People can easily share SAS packages using SAS Packages Framework(SPF) • https://github.com/SASPAC Started in 2019 by Bartosz Jablonski* * Takeda Stat programming, and also, Faculty of Mathematics and Information Science Warsaw University of Technology 3

4.

SPF and 8 packages SPF SASPAC in GitHub baseplus macroarray SPF: SAS Packages Framework Driver program of SASPAC sasplotter sasjscore gigs Load package (User) gsm dfa sqlinds To be created Create package (Developer) 4

5.
[beta]
How to use packages
1. Setting up
• Download SPF and unzip(https://github.com/yabwon/SAS_PACKAGES)
• %include in SAS like this
/*Loading SPF macros*/
filename spf "/[your_location_of_downloaded_files]/SAS_PACKAGES-main/SPF" ;
%include spf(SPFinit.sas) ;

• Folder location for packages

filename packages "/[your_location_for_packages]/" ;

2. Enjoy!

%listPackages() /*List downloaded packages*/
%installPackage(baseplus, replace=1) /*Download package(baseplus) zip from GitHub*/
%installPackage(sasplotter, replace=1) /*Download package(sasplotter) zip from GitHub*/
%loadPackage(baseplus) ; /*Load the downloaded packages for ready*/
%loadPackage(sasplotter,requiredversion=1.3) ; /*Load the downloaded packages for ready*/
You are ready using baseplus package
and sasplotter package.

5

user

6.

Unzipped SPF 6

7.
[beta]
/*example of sasplotter---------------------------------------------------------------------*/

filename raw url "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv";
proc import OUT= WORK.raw DATAFILE= raw DBMS=CSV REPLACE;
GETNAMES=YES; DATAROW=2; guessingrows=max;
run;
proc format;
value dayf
1="Mon"
2="Tue"
3="Wed"
/*RainCloud plot in sasplotter*/
4="Thu"
5="Fri"
title "simple vertical raincloud plot";
6="Sat"
ods graphics /reset=all height=15cm width=25cm
7="Sun"
imagename="rain_simple" imagefmt=png;
;
run;
%RainCloud(data=tips,
data tips;
set raw(rename=(day=day_old));
x=day,
format day dayf.;
y=total_bill,
label total_bill="Total bill (USD)"
day="day of week";
cat_iv=2.5,
select (day_old);
element_iv=0.5,
when ("Thur") day=4;
group=day,
when ("Fri") day=5;
when("Sat") day=6;
yticks=0 20 40 60,
when("Sun") day=7;
otherwise put "WAR" "NING: irregular string" day_old;
bw_method=srot,
end;
note=%nrstr(entrytitle 'your title here';
drop day_old;
entryfootnote halign=left 'your footnote here';
run;

);
7

entryfootnote halign=left 'your footnote here 2';)

9.
[beta]
How to create your package
1. Setting up
• Download SPF and unzip(https://github.com/yabwon/SAS_PACKAGES)
• %include in SAS like this

developer

/*Loading SPF macros*/
filename spf "/[your_location_of_downloaded_files]/SAS_PACKAGES-main/SPF" ;
%include spf(SPFinit.sas) ;

2. Folders and files
• Create a folder and files
/[your_location]/testPackages
└── description.sas
General info of the package
└── /01_formats
└── testformats.sas
└── /02_macros
Macros are here
└── testmacros.sas
3. Enjoy!

%generatePackage(filesLocation=/[your_location]/testpackage/ ,markdownDoc=1) /*Generate package*/
9

https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/HelloWorldPackage.md

10.

Existing Packages 1. basePlus : Bunch of functionalities 2. SASplotter : Advanced graphs for journals 3. macroArray : Macro arrays for macro codes 4. SASjsCORE : SAS Macros for Application Development 5. GIGS : Guidance for International Growth Standards (GIGS) project 6. GSM : Generate Secure Macros 7. DFA : Dynamic Function Arrays 8. SQLinDS : SQL queries in Data Step 10

11.

Benefit of SASPAC • SPFによる構造化・統一化されたパッケージフォーマット • RのPackageのように標準化された形 • Githubレポジトリから簡単に利用できる(同じく簡単に作成できる) • パッケージには、マクロだけでなくフォーマットやドキュメント等も含めることが できる • • • 11 A standardized and unified package format using SPF, similar to the standardized form of R packages. It can be easily utilized from a GitHub repository (and can also be created easily). The package can include not only macros but also formats and documentation.

12.

Future with the open and shared SAS packages Proprietaryな解析ソフトウェアであるSASも、そのノウハウやコードなどはこれまで もカンファレンスや論文で共有され、SASユーザーおよび製薬企業の大きな財産に なっている。 一方で、オープンソースソフトウェアではさらに活発な共同作業がなされており、 SASでもより活発な情報交換がなされることで、SASユーザーおよび製薬企業を通し てより患者さんへの貢献につながることが期待される。 Although SAS, a proprietary analytics software, has had its know-how and code shared through conferences and publications, becoming a significant asset for SAS users and pharmaceutical companies. On the other hand, open-source software has enabled even more active collaboration, and it is expected that increased information exchange within the SAS community can lead to greater contributions to patient care through SAS users and pharmaceutical companies. 12

13.

References • SASPAC, Github, https://github.com/SASPAC • SAS Packages: The Way to Share (a How To), SAS Global Forum 2020, Bartosz Jablonski, https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4725-2020.pdf • Integration of SAS GRID environment and SF-36 Health Survey scoring API with SAS Packages, PharmaSUG 2024, Bartosz Jablonski, https://www.lexjansen.com/pharmasug/2024/SD/PharmaSUG-2024-SD-262.pdf • Modern graph package “SAS plotter”, SAS User Group Meeting Japan 2024, Kosuke Tsutsugo, https://github.com/SASPAC/sasplotter