6 Commits

Author SHA1 Message Date
SASPAC - SAS Packages Archive
3aaf69ebab Merge pull request #35 from SASPAC/dev
The BasePlus package [ver. 1.38.0]
2024-03-12 14:46:39 +01:00
SASPAC - SAS Packages Archive
1d474a79e4 Merge branch 'main' into dev 2024-03-12 14:46:26 +01:00
Bart Jablonski
9b9d9dea38 The BasePlus package [ver. 1.38.0]
The BasePlus package [ver. 1.38.0]

Update to the `%rainCloudPlot()` macro, new parameter for "vertical" plots added.

Documentation updated and "cleaned".

---

SHA256 digest for BasePlus: `F*209FB8198270DEAB6151CE31391A352A065B4EE2689F40433FA9550A7F4AAC18`

---
2024-03-12 14:42:32 +01:00
Bart Jablonski
21316add63 The BasePlus package [ver. 1.37.0]
## The BasePlus package [ver. 1.37.0]

Changes:

- Update to the %rainCloudPlot() macro.
- New macro %iffunc() added.
- Documentation updated.

---

SHA256 digest for BasePlus: F*8155BFE82F7833E4B0DA24D81DBDFC58463906D6032B1F0161772DADE84BE790

---
2024-03-10 08:27:52 +01:00
SASPAC - SAS Packages Archive
4368138708 Merge pull request #34 from SASPAC/dev
The BasePlus package [ver. 1.37.0]
2024-03-09 13:55:02 +01:00
Bart Jablonski
78e3181151 The BasePlus package [ver. 1.37.0]
## The BasePlus package [ver. 1.37.0]

Changes:

- Update to the %rainCloudPlot() macro.
- New macro %iffunc() added.
- Documentation updated.

---

SHA256 digest for BasePlus: F*8155BFE82F7833E4B0DA24D81DBDFC58463906D6032B1F0161772DADE84BE790

---
2024-03-09 13:53:40 +01:00
29 changed files with 14432 additions and 111 deletions

View File

@@ -54,7 +54,7 @@ libname NEW "%workPath()/new";
``` ```
and more. and more.
SHA256 digest for the latest version of `BasePlus`: F*B9F1B3243FD3956F0B68652C21EA1EBC19F3EB0931774A57FECE1F02A9448108 SHA256 digest for the latest version of `BasePlus`: F*209FB8198270DEAB6151CE31391A352A065B4EE2689F40433FA9550A7F4AAC18
[**Documentation for BasePlus**](./baseplus.md "Documentation for BasePlus") [**Documentation for BasePlus**](./baseplus.md "Documentation for BasePlus")

View File

@@ -7,22 +7,22 @@
*The BASE SAS plus a bunch of functionalities I am missing in BASE SAS* *The BASE SAS plus a bunch of functionalities I am missing in BASE SAS*
- Package: BasePlus - Package: BasePlus
- Version: 1.36.0 - Version: 1.38.0
- Generated: 2024-01-12T10:32:46 - Generated: 2024-03-12T14:26:19
- Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com) - Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com)
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
- License: MIT - License: MIT
- File SHA256: `F*B9F1B3243FD3956F0B68652C21EA1EBC19F3EB0931774A57FECE1F02A9448108` for this version - File SHA256: `F*209FB8198270DEAB6151CE31391A352A065B4EE2689F40433FA9550A7F4AAC18` for this version
- Content SHA256: `C*5A51FA3E5B3A6E9AE2AF37D6604B49B8656D4CC50AFF1F975E546D4419AA0461` for this version - Content SHA256: `C*14C505C4EF488A8BE2404A692D55C8B81FC5A6075D8A35F8B6767B34ACF5E48E` for this version
--- ---
# The `BasePlus` package, version: `1.36.0`; # The `BasePlus` package, version: `1.38.0`;
--- ---
# The BasePlus package [ver. 1.36.0] <a name="baseplus-package"></a> ############################################### # The BasePlus package [ver. 1.38.0] <a name="baseplus-package"></a> ###############################################
The **BasePlus** package implements useful The **BasePlus** package implements useful
functions and functionalities I miss in the BASE SAS. functions and functionalities I miss in the BASE SAS.
@@ -165,6 +165,10 @@ Kudos to all who inspired me to generate this package:
%rainCloudPlot(sashelp.cars,DriveTrain,Invoice) %rainCloudPlot(sashelp.cars,DriveTrain,Invoice)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output can be seen in the `md` file.
![Example 1x](./baseplus_RainCloudPlot_Ex0.png)
**Example 10**: Zip SAS library. **Example 10**: Zip SAS library.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%zipLibrary(sashelp, libOut=work) %zipLibrary(sashelp, libOut=work)
@@ -345,7 +349,7 @@ run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 26** Downloading data from the internet to a local dirrectory: **EXAMPLE 26** Downloading data from the internet to a local directory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%downloadFilesTo(~/directoryA) %downloadFilesTo(~/directoryA)
datalines4; datalines4;
@@ -355,6 +359,13 @@ https://www.lexjansen.com/wuss/2023/WUSS-2023-Paper-189.zip
run; run;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 27** Conditional value assignment:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = A B C;
%let y = %iffunc((%scan(&x.,1)=A),Starts with "A"., Does not start with "A".);
%put &=y.;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- ---
--- ---
@@ -441,20 +452,21 @@ The `BasePlus` package consists of the following content:
62. [`%finddswithvarval()` macro ](#finddswithvarval-macro-62 ) 62. [`%finddswithvarval()` macro ](#finddswithvarval-macro-62 )
63. [`%fmt()` macro ](#fmt-macro-63 ) 63. [`%fmt()` macro ](#fmt-macro-63 )
64. [`%gettitle()` macro ](#gettitle-macro-64 ) 64. [`%gettitle()` macro ](#gettitle-macro-64 )
65. [`%infmt()` macro ](#infmt-macro-65 ) 65. [`%iffunc()` macro ](#iffunc-macro-65 )
66. [`%letters()` macro ](#letters-macro-66 ) 66. [`%infmt()` macro ](#infmt-macro-66 )
67. [`%libpath()` macro ](#libpath-macro-67 ) 67. [`%letters()` macro ](#letters-macro-67 )
68. [`%minclude()` macro ](#minclude-macro-68 ) 68. [`%libpath()` macro ](#libpath-macro-68 )
69. [`%monthshift()` macro ](#monthshift-macro-69 ) 69. [`%minclude()` macro ](#minclude-macro-69 )
70. [`%replist()` macro ](#replist-macro-70 ) 70. [`%monthshift()` macro ](#monthshift-macro-70 )
71. [`%time()` macro ](#time-macro-71 ) 71. [`%replist()` macro ](#replist-macro-71 )
72. [`%today()` macro ](#today-macro-72 ) 72. [`%time()` macro ](#time-macro-72 )
73. [`%translate()` macro ](#translate-macro-73 ) 73. [`%today()` macro ](#today-macro-73 )
74. [`%tranwrd()` macro ](#tranwrd-macro-74 ) 74. [`%translate()` macro ](#translate-macro-74 )
75. [`%workpath()` macro ](#workpath-macro-75 ) 75. [`%tranwrd()` macro ](#tranwrd-macro-75 )
76. [`%workpath()` macro ](#workpath-macro-76 )
93. [License note](#license) 95. [License note](#license)
--- ---
@@ -504,7 +516,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%dedupListC()` macro: <<< <a name="deduplistc-macro"></a> ####################### ## >>> `%dedupListC()` macro: <<< <a name="deduplistc-macro"></a> #######################
The `%dedupListC()` macro deletes duplicated values from The `%dedupListC()` macro deletes duplicated values from
a *COMMA separated* list of values. List, including separators, a *COMMA-separated* list of values. List, including separators,
can be no longer than a value carried by a single macro variable. can be no longer than a value carried by a single macro variable.
Returned value is *unquoted*. Leading and trailing spaces are ignored. Returned value is *unquoted*. Leading and trailing spaces are ignored.
@@ -522,7 +534,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
**Arguments description**: **Arguments description**:
1. `list` - A list of *comma separated* values. 1. `list` - A list of *comma-separated* values.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -565,7 +577,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%dedupListP()` macro: <<< <a name="deduplistp-macro"></a> ####################### ## >>> `%dedupListP()` macro: <<< <a name="deduplistp-macro"></a> #######################
The `%dedupListP()` macro deletes duplicated values from The `%dedupListP()` macro deletes duplicated values from
a *PIPE(`|`) separated* list of values. List, including separators, a *PIPE(`|`)-separated* list of values. List, including separators,
can be no longer than a value carried by a single macro variable. can be no longer than a value carried by a single macro variable.
Returned value is *unquoted*. Leading and trailing spaces are ignored. Returned value is *unquoted*. Leading and trailing spaces are ignored.
@@ -583,7 +595,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
**Arguments description**: **Arguments description**:
1. `list` - A list of *pipe separated* values. 1. `list` - A list of *pipe-separated* values.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -626,7 +638,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%dedupListS()` macro: <<< <a name="deduplists-macro"></a> ####################### ## >>> `%dedupListS()` macro: <<< <a name="deduplists-macro"></a> #######################
The `%dedupListS()` macro deletes duplicated values from The `%dedupListS()` macro deletes duplicated values from
a *SPACE separated* list of values. List, including separators, a *SPACE-separated* list of values. List, including separators,
can be no longer than a value carried by a single macro variable. can be no longer than a value carried by a single macro variable.
Returned value is *unquoted*. Returned value is *unquoted*.
@@ -638,13 +650,13 @@ The `%dedupListS()` macro executes like a pure macro code.
The basic syntax is the following, the `<...>` means optional parameters: The basic syntax is the following, the `<...>` means optional parameters:
~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~sas
%dedupListS( %dedupListS(
list of space separated values list of space-separated values
) )
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
**Arguments description**: **Arguments description**:
1. `list` - A list of *space separated* values. 1. `list` - A list of *space-separated* values.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -680,7 +692,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%dedupListX()` macro: <<< <a name="deduplistx-macro"></a> ####################### ## >>> `%dedupListX()` macro: <<< <a name="deduplistx-macro"></a> #######################
The `%dedupListX()` macro deletes duplicated values from The `%dedupListX()` macro deletes duplicated values from
a *X separated* list of values, where the `X` represents a *X-separated* list of values, where the `X` represents
a *single character* separator. List, including separators, a *single character* separator. List, including separators,
can be no longer than a value carried by a single macro variable. can be no longer than a value carried by a single macro variable.
@@ -702,7 +714,7 @@ XlistXofXxXseparatedXvalues
**Arguments description**: **Arguments description**:
1. `list` - A list of *X separated* values. 1. `list` - A list of *X-separated* values.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -761,7 +773,7 @@ and subdirectories of a given `root` directory.
The extracted info may be just a list of files and subdirectories or, if The extracted info may be just a list of files and subdirectories or, if
the `details=` parameter is set to 1, additional operating system information the `details=` parameter is set to 1, additional operating system information
is extracted (information is OSS dependent and gives different results for Linux is extracted (information is OS-dependent and gives different results for Linux
and for Windows) and for Windows)
The extracted info can be narrowed down to files (`keepFiles=1`) or to The extracted info can be narrowed down to files (`keepFiles=1`) or to
@@ -1081,12 +1093,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
%put *%str(%')%bquote(%getVars(sashelp.class,sep=''))%str(%')*; %put *%str(%')%bquote(%getVars(sashelp.class,sep=''))%str(%')*;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c) coma separated double quote list: c) comma-separated double quote list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put *"%getVars(sashelp.class,sep=%str(", "))"*; %put *"%getVars(sashelp.class,sep=%str(", "))"*;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d) coma separated single quote list: d) comma-separated single quote list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put *%str(%')%getVars(sashelp.class,sep=', ')%str(%')*; %put *%str(%')%getVars(sashelp.class,sep=', ')%str(%')*;
%let x = %str(%')%getVars(sashelp.class,sep=', ')%str(%'); %let x = %str(%')%getVars(sashelp.class,sep=', ')%str(%');
@@ -1151,12 +1163,12 @@ a) one single or double qiote:
%put *%QgetVars(sashelp.class,quote='')*; %put *%QgetVars(sashelp.class,quote='')*;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c) coma separated double quote list: c) comma-separated double quote list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put *%getVars(sashelp.class,sep=%str(,),quote=%str(%"))*; %put *%getVars(sashelp.class,sep=%str(,),quote=%str(%"))*;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d) coma separated single quote list: d) comma-separated single quote list:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = %getVars(sashelp.class,sep=%str(,),quote=%str(%')); %let x = %getVars(sashelp.class,sep=%str(,),quote=%str(%'));
%put &=x.; %put &=x.;
@@ -1534,8 +1546,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
) )
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
The text string is concider as *"only dataset name"*, i.e. macro does not The text string is consider as *"only dataset name"*, i.e. macro does not
assume it contain library as prefix or data set options as sufix. assume it contain library as prefix or data set options as suffix.
See the `%LDSN()` macro for comparison. See the `%LDSN()` macro for comparison.
--- ---
@@ -1766,7 +1778,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%QdedupListX()` macro: <<< <a name="qdeduplistx-macro"></a> ####################### ## >>> `%QdedupListX()` macro: <<< <a name="qdeduplistx-macro"></a> #######################
The `%QdedupListX()` macro deletes duplicated values from The `%QdedupListX()` macro deletes duplicated values from
a *X separated* list of values, where the `X` represents a *X-separated* list of values, where the `X` represents
a *single character* separator. List, including separators, a *single character* separator. List, including separators,
can be no longer than a value carried by a single macro variable. can be no longer than a value carried by a single macro variable.
@@ -1788,7 +1800,7 @@ XlistXofXxXseparatedXvalues
**Arguments description**: **Arguments description**:
1. `list` - A list of *X separated* values. 1. `list` - A list of *X-separated* values.
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
@@ -1898,9 +1910,9 @@ See examples in `%getVars()` help for the details.
The zipEvalf() and QzipEvalf() macro functions The zipEvalf() and QzipEvalf() macro functions
allow to use a function on elements of pair of allow to use a function on elements of pair of
space separated lists. space-separated lists.
For two space separated lists of text strings the corresponding For two space-separated lists of text strings the corresponding
elements are taken and the macro applies a function, provided by user, elements are taken and the macro applies a function, provided by user,
to calculate result of the function on taken elements. to calculate result of the function on taken elements.
@@ -1932,9 +1944,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
**Arguments description**: **Arguments description**:
1. `first` - *Required*, a space separated list of texts. 1. `first` - *Required*, a space-separated list of texts.
2. `second` - *Required*, a space separated list of texts. 2. `second` - *Required*, a space-separated list of texts.
* `function = cat` - *Optional*, default value is `cat`, * `function = cat` - *Optional*, default value is `cat`,
a function which will be applied a function which will be applied
@@ -1951,18 +1963,18 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `argBf =` - *Optional*, default value is empty, * `argBf =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*before* elements the first list. *before* elements the first list.
If multiple should be comma separated. If multiple should be comma-separated.
* `argMd =` - *Optional*, default value is empty, * `argMd =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*between* elements the first list and *between* elements the first list and
the second list. the second list.
If multiple should be comma separated. If multiple should be comma-separated.
* `argAf =` - *Optional*, default value is empty, * `argAf =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*after* elements the second list. *after* elements the second list.
If multiple should be comma separated. If multiple should be comma-separated.
* `format=` - *Optional*, default value is empty, * `format=` - *Optional*, default value is empty,
indicates a format which should be used indicates a format which should be used
@@ -1983,8 +1995,8 @@ See examples in `%zipEvalf()` help for the details.
## >>> `%RainCloudPlot()` macro: <<< <a name="raincloudplot-macro"></a> ####################### ## >>> `%RainCloudPlot()` macro: <<< <a name="raincloudplot-macro"></a> #######################
The RainCloudPlot() macro allow to plot Rain Cloud plots, i.e. pots of The RainCloudPlot() macro allow to plot Rain Cloud plots, i.e.
kernel density estimates, jitter data values, and box-and-whiskers plot. plots of kernel density estimates, jitter data values, and box-and-whiskers plot.
See examples below for the details. See examples below for the details.
@@ -2018,6 +2030,8 @@ The basic syntax is the following, the `<...>` means optional parameters:
<,y2axis=> <,y2axis=>
<,y2axisLevels=> <,y2axisLevels=>
<,y2axisValueAttrs=> <,y2axisValueAttrs=>
<,y2axisFormat=>
<,y2axisLines=>
<,catAxisValueAttrs=> <,catAxisValueAttrs=>
<,xaxisValueAttrs=> <,xaxisValueAttrs=>
<,xaxisTickstyle=> <,xaxisTickstyle=>
@@ -2028,8 +2042,10 @@ The basic syntax is the following, the `<...>` means optional parameters:
<,VSCALE=> <,VSCALE=>
<,KERNEL_K=> <,KERNEL_K=>
<,KERNEL_C=> <,KERNEL_C=>
<,VSCALEmax=>
<,cleanTempData=> <,cleanTempData=>
<,codePreview=>
) )
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@@ -2091,44 +2107,50 @@ The basic syntax is the following, the `<...>` means optional parameters:
For details see notes below. For details see notes below.
* `catLabels` - *Optional*, default value is empty. * `catLabels` - *Optional*, default value is empty.
List of values for group axix labels (vertical). List of values for group axis labels (vertical).
When empty a grouping variable name is used. When empty a grouping variable name is used.
For details see notes below. For details see notes below.
* `xLabels` - *Optional*, default value is empty. * `xLabels` - *Optional*, default value is empty.
List of values for data variable axix labels (horizontal). List of values for data variable axis labels (horizontal).
When empty a data variable name is used. When empty a data variable name is used.
For details see notes below. For details see notes below.
* `catLabelPos` - *Optional*, default value `DATACENTER`. * `catLabelPos` - *Optional*, default value `DATACENTER`.
Indicates position of the label on group axix (vertical). Indicates position of the label on group axis (vertical).
Allowed values are `BOTTOM`, `CENTER`, `DATACENTER`, and `TOP`. Allowed values are `BOTTOM`, `CENTER`, `DATACENTER`, and `TOP`.
* `xLabelPos` - *Optional*, default value `DATACENTER`. * `xLabelPos` - *Optional*, default value `DATACENTER`.
Indicates position of the label on data axix (horizontal). Indicates position of the label on data axis (horizontal).
Allowed values are `LEFT`, `CENTER`, `DATACENTER`, and `RIGHT`. Allowed values are `LEFT`, `CENTER`, `DATACENTER`, and `RIGHT`.
* `catLabelAttrs` - *Optional*, default value is empty. * `catLabelAttrs` - *Optional*, default value is empty.
List of attributes for group axix labels (vertical). List of attributes for group axis labels (vertical).
For details see notes below. For details see notes below.
* `xLabelAttrs` - *Optional*, default value is empty. * `xLabelAttrs` - *Optional*, default value is empty.
List of attributes for data variable axix labels (horizontal). List of attributes for data variable axis labels (horizontal).
For details see notes below. For details see notes below.
* `formated` - *Optional*, default value `0`. * `formated` - *Optional*, default value `0`.
Indicates if values of the grouping variable should be formated. Indicates if values of the grouping variable should be formatted.
* `y2axis` - *Optional*, default value `1`. * `y2axis` - *Optional*, default value `1`.
Indicates if the right vertical axix should be displayed. Indicates if the right vertical axis should be displayed.
* `y2axisLevels` - *Optional*, default value `4`. * `y2axisLevels` - *Optional*, default value `4`.
Indicates if the number of expected levels of values printed Indicates if the number of expected levels of values printed
on the right vertical axix. on the right vertical axis.
* `y2axisValueAttrs` - *Optional*, default value `Color=Grey`. * `y2axisValueAttrs` - *Optional*, default value `Color=Grey`.
Allows to modify Y2 axis values attributes. Allows to modify Y2 axis values attributes.
* `y2axisFormat` - *Optional*, default value `12.2-L`.
Allows to modify Y2 axis values format.
* `y2axisLines` - *Optional*, default value `0`.
If `1`, adds horizontal lines for Y2 axis values.
* `catAxisValueAttrs` - *Optional*, default value `Color=Black`. * `catAxisValueAttrs` - *Optional*, default value `Color=Black`.
Allows to modify category (Y) axis values attributes. Allows to modify category (Y) axis values attributes.
@@ -2152,6 +2174,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
By default only the: `width=`, `height=`, and `antialiasmax=` By default only the: `width=`, `height=`, and `antialiasmax=`
are modified. are modified.
* `vertical` - *Optional*, default value is `0`.
Set value to `1` to plot "clouds & boxes" vertically.
**NOTE:** *Before setting the parameter to `1`, first
prepare the plot in the "horizontal" version since all
other parameters assume that orientation(!) and then are
converted accordingly.*
***Stat related options***: ***Stat related options***:
@@ -2171,11 +2199,21 @@ The basic syntax is the following, the `<...>` means optional parameters:
Specifies standardized bandwidth parameter *C* to compute kernel density estimates. Specifies standardized bandwidth parameter *C* to compute kernel density estimates.
Allowed values are between `0` and `1`, Allowed values are between `0` and `1`,
* `VSCALEmax` - *Optional*, default value is empty.
Provides maximal value for Y2 axis scale. When used an information
note is displayed in the log. Recommended values are:
For `VSCALE=PERCENT` between 0 and 100,
for `VSCALE=PROPORTION` between 0 and 1, and
for `VSCALE=COUNT` between 0 and N (sample size).
***Other options***: ***Other options***:
* `cleanTempData` - *Optional*, default value `1`. * `cleanTempData` - *Optional*, default value `1`.
Indicates if temporary data sets should be deleted. Indicates if temporary data sets should be deleted.
* `codePreview` - *Optional*, default value `0`.
Indicates if source code should be MPRINTed to log.
--- ---
### NOTES: ################################################################### ### NOTES: ###################################################################
@@ -2190,20 +2228,24 @@ The basic syntax is the following, the `<...>` means optional parameters:
Use the `%str()` or `%nrstr()` macro-function to handle special characters. Use the `%str()` or `%nrstr()` macro-function to handle special characters.
The `%unquote()` is used when resolving the parameter. The `%unquote()` is used when resolving the parameter.
* The `catLabels` and `xLabels` should be quoted comma separated lists enclosed with brackets, * The `catLabels` and `xLabels` should be quoted comma-separated lists enclosed with brackets,
e.g. `catLabels=("Continent of Origin", "Car Type")`, see Example below. e.g. `catLabels=("Continent of Origin", "Car Type")`, see Example below.
* The `catLabelAttrs` and `xLabelAttrs` should be space separated lists of `key=value` pairs, * The `catLabelAttrs` and `xLabelAttrs` should be space-separated lists of `key=value` pairs,
e.g. `xLabelAttrs=size=12 color=Pink weight=bold`, see Example below. e.g. `xLabelAttrs=size=12 color=Pink weight=bold`, see Example below.
* Kernel density estimates and basic statistics are calculated with `PROC UNIVARIATE`. * Kernel density estimates and basic statistics are calculated with `PROC UNIVARIATE`.
* Plot is generated by `PROC SGPLOT` with `BAND`, `SCATTE`, and `POLYGON` plots. * Plot is generated by `PROC SGPLOT` with `BAND`, `SCATTER`, and `POLYGON` plots.
* After execution the ODS graphics dimension parameters are set to `800px` by `600px`. * After execution the ODS graphics dimension parameters are set to `800px` by `600px`.
* SAS notes (`NOTE:`) are disabled for the execution time. * SAS notes (`NOTE:`) are disabled for the execution time.
* Before setting the `vertical=` parameter to `1`, first prepare the plot
in the "horizontal" version since all other parameters assume that orientation(!)
and then are converted accordingly.
* List of predefined colours is: * List of predefined colours is:
`BlueViolet`, `RoyalBlue`, `OliveDrab`, `Gold`, `HotPink`, `Crimson`, `BlueViolet`, `RoyalBlue`, `OliveDrab`, `Gold`, `HotPink`, `Crimson`,
`MediumPurple`, `CornflowerBlue`, `YellowGreen`, `Goldenrod`, `Orchid`, `IndianRed`. `MediumPurple`, `CornflowerBlue`, `YellowGreen`, `Goldenrod`, `Orchid`, `IndianRed`.
@@ -2211,12 +2253,12 @@ The basic syntax is the following, the `<...>` means optional parameters:
### BOX-AND-WHISKERS PLOT: ################################################################### ### BOX-AND-WHISKERS PLOT: ###################################################################
The box-and-whiskers plot has the following interpretation: The box-and-whiskers plot has the following interpretation:
- left vertical bar indicates the minimum, - left vertical bar indicates the *minimum*,
- left whisker line starts at `max(Q1 - 1.5IQR, minimum)` and ends at lower quartile (Q1), - left whisker line starts at `max(Q1 - 1.5IQR, minimum)` and ends at lower quartile (Q1),
- diamond indicates mean, - diamond indicates mean,
- vertical bar inside of the box indicates median, - vertical bar inside of the box indicates median,
- right whisker line starts at upper quartile (Q3) and ends at `min(Q3 + 1.5IQR, maximum)`, - right whisker line starts at upper quartile (Q3) and ends at `min(Q3 + 1.5IQR, maximum)`,
- right vertical bar indicates the maximum. - right vertical bar indicates the *maximum*.
With above setup it may happen that With above setup it may happen that
there is a gap between the minimum marker and the beginning of the left whisker there is a gap between the minimum marker and the beginning of the left whisker
@@ -2236,6 +2278,7 @@ See examples below.
g = "Aaa"; g = "Aaa";
do _N_ = 1 to 50; do _N_ = 1 to 50;
x = rannor(42); x = rannor(42);
y = ranuni(42);
output; output;
end; end;
@@ -2246,22 +2289,26 @@ See examples below.
when(6,7,8) x = 0.5*rannor(42)+3; when(6,7,8) x = 0.5*rannor(42)+3;
otherwise x = 0.5*rannor(42)+5; otherwise x = 0.5*rannor(42)+5;
end; end;
y = ranuni(42)+1;
output; output;
end; end;
g = "C"; g = "C";
do _N_ = 1 to 60; do _N_ = 1 to 60;
x = 3*rannor(42)+7; x = 3*rannor(42)+7;
y = ranuni(42)+2;
output; output;
end; end;
run; run;
%RainCloudPlot(have, g, x) %RainCloudPlot(have, g, x y)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output: The output can be seen in the `md` file.
![Example 1](./baseplus_RainCloudPlot_Ex1.png) ![Example 1x](./baseplus_RainCloudPlot_Ex1x.png)
![Example 1y](./baseplus_RainCloudPlot_Ex1y.png)
**EXAMPLE 2.** Rain Cloud plot for `sashelp.cars` dataset **EXAMPLE 2.** Rain Cloud plot for `sashelp.cars` dataset
with groups by Origin or Type with groups by Origin or Type
@@ -2281,7 +2328,7 @@ The output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output: The output can be seen in the `md` file.
![Example 2a](./baseplus_RainCloudPlot_Ex2a.png) ![Example 2a](./baseplus_RainCloudPlot_Ex2a.png)
![Example 2b](./baseplus_RainCloudPlot_Ex2b.png) ![Example 2b](./baseplus_RainCloudPlot_Ex2b.png)
@@ -2316,29 +2363,71 @@ The output:
data test; data test;
do system = 1 to 3; do system = 1 to 3;
do i = 1 to 50; do i = 1 to 50;
x = rannor(123)/system; x = 2*rannor(123)/system - system;
output; output;
end; end;
end; end;
format system system.; format system system.;
run; run;
%RainCloudPlot(test, system, x %RainCloudPlot(test, system, x
, colorslist=CX88CCEE CX44AA99 CX117733 , colorslist=CX88CCEE CX44AA99 CX117733
, formated=1 , formated=1
, sganno=annotation , sganno=annotation
, sgPlotOptions=noborder , sgPlotOptions=noborder
, WidthPX=1000 , WidthPX=1000
, HeightPX=320 , HeightPX=380
, catAxisValueAttrs=Color=Green weight=bold , catAxisValueAttrs=Color=Green weight=bold
, VSCALE=percent
, cleanTempData=0
, y2axisLevels=5
, y2axisFormat=words20.-L
, VSCALEmax=60
, codePreview=1
, y2axisValueAttrs=Color=Grey size=10px
, y2axisLines=1
, xLabels="variable X"
, title = %nrstr(title1;
title2 JUSTIFY=L "Rain Cloud plot for &list_g. by " %unquote(&xLabel.);
title3 JUSTIFY=C "Rain Cloud plot for &list_g. by " %unquote(&xLabel.);
title4 JUSTIFY=R "Rain Cloud plot for &list_g. by " %unquote(&xLabel.);
)
) )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output: The output can be seen in the `md` file.
![Example 3](./baseplus_RainCloudPlot_Ex3.png) ![Example 3](./baseplus_RainCloudPlot_Ex3.png)
**EXAMPLE 4.** Rain Cloud plot for `sashelp.cars` dataset
with groups by Drive Train for Weight (LBS)
variable ploted "vertically":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%RainCloudPlot(
sashelp.cars
, DriveTrain
, Weight
, HeightPX=400
, colorslist=Red Green Blue
, y2axisLevels=5
, catLabels=("DriveTrain")
, xLabels="Weight (LBS)"
, xLabelAttrs=size=12 color=Black weight=bold
, y2axisLines=1
, vscale=percent
, vscalemax=50
, vertical = 1
, title = %nrstr(title1 J=C HEIGHT=3 "The VERTICAL plotting is cool, ...";)
, footnote = %nrstr(footnote1 J=L HEIGHT=2 "... isn't it?";)
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output can be seen in the `md` file.
![Example 4](./baseplus_RainCloudPlot_Ex4.png)
--- ---
@@ -2672,7 +2761,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## >>> `%unzipArch()` macro: <<< <a name="unziparch-macro"></a> ####################### ## >>> `%unzipArch()` macro: <<< <a name="unziparch-macro"></a> #######################
The unzipArch() macro allows to unzip content of a ZIP archive. The unzipArch() macro allows to unzip content of a ZIP archive.
Macro is OS independent, the `XCMD` option is not required. Macro is OS-independent, the `XCMD` option is not required.
The `dlCreateDir` option is used under the hood. The `dlCreateDir` option is used under the hood.
@@ -2905,7 +2994,7 @@ run;
## >>> `%zipArch()` macro: <<< <a name="ziparch-macro"></a> ####################### ## >>> `%zipArch()` macro: <<< <a name="ziparch-macro"></a> #######################
The zipArch() macro allows to ZIP content of a directory. The zipArch() macro allows to ZIP content of a directory.
Macro is OS independent, the `XCMD` option is not required. Macro is OS-independent, the `XCMD` option is not required.
Content of zipped archive can be listed in the log. Content of zipped archive can be listed in the log.
@@ -3042,9 +3131,9 @@ run;
The zipEvalf() and QzipEvalf() macro functions The zipEvalf() and QzipEvalf() macro functions
allow to use a function on elements of pair of allow to use a function on elements of pair of
space separated lists. space-separated lists.
For two space separated lists of text strings the corresponding For two space-separated lists of text strings the corresponding
elements are taken and the macro applies a function, provided by user, elements are taken and the macro applies a function, provided by user,
to calculate result of the function on taken elements. to calculate result of the function on taken elements.
@@ -3076,9 +3165,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
**Arguments description**: **Arguments description**:
1. `first` - *Required*, a space separated list of texts. 1. `first` - *Required*, a space-separated list of texts.
2. `second` - *Required*, a space separated list of texts. 2. `second` - *Required*, a space-separated list of texts.
* `function = cat` - *Optional*, default value is `cat`, * `function = cat` - *Optional*, default value is `cat`,
a function which will be applied a function which will be applied
@@ -3095,18 +3184,18 @@ The basic syntax is the following, the `<...>` means optional parameters:
* `argBf =` - *Optional*, default value is empty, * `argBf =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*before* elements the first list. *before* elements the first list.
If multiple should be comma separated. If multiple should be comma-separated.
* `argMd =` - *Optional*, default value is empty, * `argMd =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*between* elements the first list and *between* elements the first list and
the second list. the second list.
If multiple should be comma separated. If multiple should be comma-separated.
* `argAf =` - *Optional*, default value is empty, * `argAf =` - *Optional*, default value is empty,
arguments of the function inserted arguments of the function inserted
*after* elements the second list. *after* elements the second list.
If multiple should be comma separated. If multiple should be comma-separated.
* `format=` - *Optional*, default value is empty, * `format=` - *Optional*, default value is empty,
indicates a format which should be used indicates a format which should be used
@@ -5709,7 +5798,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
1. `number` - *Optional*, default value is empty, 1. `number` - *Optional*, default value is empty,
indicates numbers of titles to be extracted. indicates numbers of titles to be extracted.
Space separated list is expected. Space-separated list is expected.
If empty or `_ALL_` extract all non-missing. If empty or `_ALL_` extract all non-missing.
*. `type` - *Optional*, default value is `T`. *. `type` - *Optional*, default value is `T`.
@@ -5763,7 +5852,208 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%infmt()` macro <a name="infmt-macro-65"></a> ###### ## `%iffunc()` macro <a name="iffunc-macro-65"></a> ######
## >>> `%iffunc()` macro: <<< <a name="iffunc-macro"></a> #######################
The iffunc() macro function is a "lazy typer" wrapping up conditional execution.
Instead typing:
~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = 1;
%if (1=&x.) %then
%do;
%let test = TRUE;
%end;
%else
%do;
%let test = FALSE;
%end;
%put &=test.;
~~~~~~~~~~~~~~~~~~~~~~~
you can make it:
~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = 1;
%let test = %iffunc((1=&x.),TRUE,FALSE);
%put &=test.;
~~~~~~~~~~~~~~~~~~~~~~~
The `%iffunc()` macro ca be nested in open code
in contrary to standard `%IF-%THEN-%ELSE`.
The `minoperator` option is used to handle `IN` operator,
but the `IN` operator in the condition *has* to be surrounded
by spaces, e.g. `&x. in (1 2 3)`.
Condition of the form `&x. in(1 2 3)` (no space after `in`) will
result with an error.
See examples below for the details.
The `%iffunc()` macro executes like a pure macro code.
### SYNTAX: ###################################################################
The basic syntax is the following, the `<...>` means optional parameters:
~~~~~~~~~~~~~~~~~~~~~~~sas
%iffunc(
cond
,true
,false
<,v=>
)
~~~~~~~~~~~~~~~~~~~~~~~
**Arguments description**:
1. `cond` - *Required*, is a condition to be evaluated.
It **has** to be provided in brackets,
e.g., `(1=&x.)` or `(%scan(&x.,1)=A)`.
2. `true` - *Required*, value returned when condition is true.
3. `false` - *Required*, value returned when condition is false.
4 `v=` - *Optional*, v for verbose. If set to `1` extra notes
are printed.
---
### EXAMPLES AND USECASES: ####################################################
**EXAMPLE 1.** Simple test:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = 1;
%let test = %iffunc((&x.=1),True,False);
%put &=test.;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 2.** Verbose with `v=` in the `%put` statement:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put %iffunc((TRUE=true),TRUE,FALSE,v=1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 3.** Condition can be with decimals or text:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put True: %iffunc((9.9<10),TRUE,FALSE);
%put False: %iffunc((A>B),TRUE,FALSE);
%put True: %iffunc((1=1.0),TRUE,FALSE);
%put False: %iffunc((1/3 = 0.5),TRUE,FALSE);
%put True: %iffunc((.1+.1+.1+.1+.1+.1+.1+.1+.1+.1 = 1),TRUE,FALSE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 4.** Macro-Functions works too:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = A B C;
%put %iffunc((%scan(&x.,1)=A),Starts with "A"., Does not start with "A".);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 5.** Simple nesting (in open code):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x=0;
%let y=0;
%put
%iffunc((&x.)
,It is X.
,%iffunc((&y.)
,It is Y.
,It is Z.
,v=1)
,v=1)
;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 6.** Special characters have to be masked:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put %iffunc(1,%str(,),%str(;));
%put %iffunc(0,%str(,),%str(;));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 7.** If you want to call macros there is a price.
The `%nrstr()` and `%unquote()` are required:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%macro doX(a,b);
%put >>> &a. &b;
data do_X;
set sashelp.class;
run;
%mend;
%macro doY(a,b);
%put ### &a. &b;
data do_Y;
set sashelp.cars;
run;
%mend;
%macro doZ(a,b);
%put @@@ &a. &b;
data do_Z;
set sashelp.iris;
run;
%mend;
%let x=0;
%let y=0;
%unquote(
%iffunc((&x.)
,%nrstr(%doX(1,2))
,%iffunc((&y.)
,%nrstr(%doY(3,4))
,%nrstr(%doZ(5,6))
,v=1)
,v=1)
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 8.** Traffic lights with `NOTE:` and `ERROR:`,
Remember to handle the `IN` operator with an extra care.
Spaces are required around the `IN` operator.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = A;
%put %iffunc((&x. IN (A B C)),NOTE:,ERROR:) x=%superq(x);
%let x = 7;
%put %iffunc((&x. IN (1 3 5)),NOTE:,ERROR:) x=%superq(x);
%let x = 1.1;
%put %iffunc((&x. IN (1.1 2.1 3.1)),NOTE:,ERROR:) x=%superq(x);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**EXAMPLE 9.** Mixing `IN` operator with non-integer evaluation
requires `%sysevalf()` function:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%let x = Y;
%let y = 9.9;
%put THIS will be False: %iffunc((&x. in (y Y) AND &y.<10),TRUE,FALSE);
%put THIS will be True: %iffunc((&x. in (y Y) AND %sysevalf(&y.<10)),TRUE,FALSE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
---
## `%infmt()` macro <a name="infmt-macro-66"></a> ######
## >>> `%infmt()` macro: <<< <a name="infmt-macro"></a> ####################### ## >>> `%infmt()` macro: <<< <a name="infmt-macro"></a> #######################
@@ -5820,7 +6110,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%letters()` macro <a name="letters-macro-66"></a> ###### ## `%letters()` macro <a name="letters-macro-67"></a> ######
## >>> `%letters()` macro: <<< <a name="letters-macro"></a> ####################### ## >>> `%letters()` macro: <<< <a name="letters-macro"></a> #######################
@@ -5875,7 +6165,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
### EXAMPLES AND USECASES: #################################################### ### EXAMPLES AND USECASES: ####################################################
**EXAMPLE 1.** Space separated list of capital letters from A to Z: **EXAMPLE 1.** Space-separated list of capital letters from A to Z:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
%put %letters(1:26:1); %put %letters(1:26:1);
@@ -5938,7 +6228,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%libpath()` macro <a name="libpath-macro-67"></a> ###### ## `%libpath()` macro <a name="libpath-macro-68"></a> ######
## >>> `%libPath()` macro: <<< <a name="libpath-macro"></a> ####################### ## >>> `%libPath()` macro: <<< <a name="libpath-macro"></a> #######################
@@ -5983,7 +6273,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%minclude()` macro <a name="minclude-macro-68"></a> ###### ## `%minclude()` macro <a name="minclude-macro-69"></a> ######
## >>> `%mInclude()` macro: <<< <a name="minclude-macro"></a> ####################### ## >>> `%mInclude()` macro: <<< <a name="minclude-macro"></a> #######################
@@ -6196,7 +6486,7 @@ quit;
--- ---
## `%monthshift()` macro <a name="monthshift-macro-69"></a> ###### ## `%monthshift()` macro <a name="monthshift-macro-70"></a> ######
## >>> `%monthShift()` macro: <<< <a name="monthshift-macro"></a> ####################### ## >>> `%monthShift()` macro: <<< <a name="monthshift-macro"></a> #######################
@@ -6345,7 +6635,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%replist()` macro <a name="replist-macro-70"></a> ###### ## `%replist()` macro <a name="replist-macro-71"></a> ######
## >>> `%repList()` macro: <<< <a name="replist-macro"></a> ####################### ## >>> `%repList()` macro: <<< <a name="replist-macro"></a> #######################
@@ -6373,9 +6663,9 @@ The basic syntax is the following, the `<...>` means optional parameters:
**Arguments description**: **Arguments description**:
1. `list` - *Required*, a list of elements to be repeated. 1. `list` - *Required*, a list of elements to be repeated.
List can be space or comma separated. List can be space or comma-separated.
Elements can be in quotes. Elements can be in quotes.
For comma separated list add brackets For comma-separated list add brackets
e.g., `%repList((A,B,C,D),times=5)`. e.g., `%repList((A,B,C,D),times=5)`.
The list separators are: `<{[( ,;)]}>`. The list separators are: `<{[( ,;)]}>`.
@@ -6461,7 +6751,7 @@ run;
--- ---
## `%time()` macro <a name="time-macro-71"></a> ###### ## `%time()` macro <a name="time-macro-72"></a> ######
## >>> `%time()` macro: <<< <a name="time-macro"></a> ####################### ## >>> `%time()` macro: <<< <a name="time-macro"></a> #######################
@@ -6504,7 +6794,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%today()` macro <a name="today-macro-72"></a> ###### ## `%today()` macro <a name="today-macro-73"></a> ######
## >>> `%today()` macro: <<< <a name="today-macro"></a> ####################### ## >>> `%today()` macro: <<< <a name="today-macro"></a> #######################
@@ -6547,7 +6837,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%translate()` macro <a name="translate-macro-73"></a> ###### ## `%translate()` macro <a name="translate-macro-74"></a> ######
## >>> `%translate()` macro: <<< <a name="translate-macro"></a> ####################### ## >>> `%translate()` macro: <<< <a name="translate-macro"></a> #######################
@@ -6611,7 +6901,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%tranwrd()` macro <a name="tranwrd-macro-74"></a> ###### ## `%tranwrd()` macro <a name="tranwrd-macro-75"></a> ######
## >>> `%tranwrd()` macro: <<< <a name="tranwrd-macro"></a> ####################### ## >>> `%tranwrd()` macro: <<< <a name="tranwrd-macro"></a> #######################
@@ -6678,7 +6968,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
--- ---
## `%workpath()` macro <a name="workpath-macro-75"></a> ###### ## `%workpath()` macro <a name="workpath-macro-76"></a> ######
## >>> `%workPath()` macro: <<< <a name="workpath-macro"></a> ####################### ## >>> `%workPath()` macro: <<< <a name="workpath-macro"></a> #######################

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

6996
hist/1.37.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/1.37.0/baseplus.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

7035
hist/1.38.0/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/1.38.0/baseplus.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB