mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2025-12-10 10:44:35 +00:00
The BasePlus package [ver. 2.0.1]
## The BasePlus package [ver. 2.0.1] This release is dedicated to all dyslexics in the world. ### Changes: New macros: - [`%expandDataSetsList()`](https://github.com/SASPAC/baseplus/blob/2.0.0/baseplus.md#expanddatasetslist-macro) allowing to expand data set lists of the form: `a1-a3`, `b_:`, mixed, and `_all_`; - [`%unifyVarsCaseSize()`](https://github.com/SASPAC/baseplus/blob/2.0.0/baseplus.md#unifyvarscasesize-macro) allowing to convert all variables in a list of datasets to all-low-case or all-upcase letters. Both macros are result of recent discussions at `SAS-L` and `communities.sas.com`. New format/informats: - [`bpklength.`](https://github.com/SASPAC/baseplus/blob/2.0.0/baseplus.md#bpklength-format) - [`bplength.`](https://github.com/SASPAC/baseplus/blob/2.0.0/baseplus.md#bplength-format) - Bug fix in spelling (`lenght` vs `length`). See [documentation](https://github.com/SASPAC/baseplus/blob/main/baseplus.md) for details. --- SHA256 digest for BasePlus: `F*FB102C9B12E870666C15A651017D48E0141E47D64C11437350D0EC75A7E9E609` --- ### Example 1. New macros. ~~~~sas data a1 a2 a3 b_x b_y b_z; set sashelp.class(obs=1); run; %put #%expandDataSetsList(lib=work,datasets=a1-a3 b_:)#; proc print data=a1; proc print data=b_x; run; %unifyVarsCaseSize(work,a1-a3 b_:) proc print data=a1; proc print data=b_x; run; ~~~~ ### Example 2. New formats/informats: ~~~~sas data _null_; x = input('żółw', bpklength.); y = input('żółw', bplength.); put x= y=; run; ~~~~ ~~~~log x=4 y=7 ~~~~
This commit is contained in:
@@ -86,7 +86,7 @@ SHA256 digest for macroArray: F*3F3893F1FCD78719543703E4353F4CC19811D247C016F220
|
||||
|
||||
---
|
||||
|
||||
- **BasePlus**\[2.0.0\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
- **BasePlus**\[2.0.1\] adds a bunch of functionalities I am missing in BASE SAS, such as:
|
||||
```sas
|
||||
call arrMissToRight(myArray);
|
||||
call arrFillMiss(17, myArray);
|
||||
@@ -118,7 +118,7 @@ format x bool.;
|
||||
|
||||
%put #%expandDataSetsList(lib=sashelp,datasets=_all_)#;
|
||||
```
|
||||
SHA256 digest for BasePlus: F*0730DD793516E5C193842126A7EC9D339ADADD19F0F40B071F938CABDE4E66AD
|
||||
SHA256 digest for BasePlus: F*FB102C9B12E870666C15A651017D48E0141E47D64C11437350D0EC75A7E9E609
|
||||
|
||||
[Documentation for BasePlus](https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md "Documentation for BasePlus")
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* 20240722 */
|
||||
/* 20240724 */
|
||||
BasePlus: F*FB102C9B12E870666C15A651017D48E0141E47D64C11437350D0EC75A7E9E609
|
||||
|
||||
/* 20240723 */
|
||||
BasePlus: F*0730DD793516E5C193842126A7EC9D339ADADD19F0F40B071F938CABDE4E66AD
|
||||
|
||||
/* 20240722 */
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
### Version information:
|
||||
|
||||
- Package: BasePlus
|
||||
- Version: 2.0.0
|
||||
- Generated: 2024-07-23T21:51:33
|
||||
- Version: 2.0.1
|
||||
- Generated: 2024-07-24T07:58:59
|
||||
- Author(s): Bartosz Jablonski (yabwon@gmail.com), Quentin McMullen (qmcmullen@gmail.com)
|
||||
- Maintainer(s): Bartosz Jablonski (yabwon@gmail.com)
|
||||
- License: MIT
|
||||
- File SHA256: `F*0730DD793516E5C193842126A7EC9D339ADADD19F0F40B071F938CABDE4E66AD` for this version
|
||||
- Content SHA256: `C*0352F7BB04B99D620BEFD33FF1B1FF1835E6F8F21CC6A764D05EEE51E77E57E0` for this version
|
||||
- File SHA256: `F*FB102C9B12E870666C15A651017D48E0141E47D64C11437350D0EC75A7E9E609` for this version
|
||||
- Content SHA256: `C*0444AC5B54150AE5424D335FF89A03D831F00F60898C99250CD59E0C5C5B0398` for this version
|
||||
|
||||
---
|
||||
|
||||
# The `BasePlus` package, version: `2.0.0`;
|
||||
# The `BasePlus` package, version: `2.0.1`;
|
||||
|
||||
---
|
||||
|
||||
|
||||
# The BasePlus package [ver. 2.0.0] <a name="baseplus-package"></a> ###############################################
|
||||
# The BasePlus package [ver. 2.0.1] <a name="baseplus-package"></a> ###############################################
|
||||
|
||||
The **BasePlus** package implements useful
|
||||
functions and functionalities I miss in the BASE SAS.
|
||||
@@ -4521,9 +4521,9 @@ semicolonN(X)
|
||||
|
||||
## `$bpklenght.` format/informat <a name="bpklenght-formats-49"></a> ######
|
||||
|
||||
## >>> `bpklenght` format/informat: <<< <a name="bpklenght-format"></a> #######################
|
||||
## >>> `bpklength` format/informat: <<< <a name="bpklength-format"></a> #######################
|
||||
|
||||
The **bpklenght** format and informats uses the `klength()` function
|
||||
The **bpklength** format and informats uses the `klength()` function
|
||||
to count the number of letters in a word. For empty string returns 0.
|
||||
|
||||
|
||||
@@ -4533,9 +4533,9 @@ to count the number of letters in a word. For empty string returns 0.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
data work.count_letters;
|
||||
input x $ 32.;
|
||||
n = input (x, bpklenght.);
|
||||
c = input (x, $bpklenght.);
|
||||
format x $bpklenght.;
|
||||
n = input (x, bpklength.);
|
||||
c = input (x, $bpklength.);
|
||||
format x $bpklength.;
|
||||
cards;
|
||||
ż
|
||||
żó
|
||||
@@ -4570,7 +4570,7 @@ data _null_;
|
||||
length x $ 32767;
|
||||
do i = 32767/3 to 0 by -1111, 10 to 0 by -1;
|
||||
x=repeat("空",i);
|
||||
put x $bpklenght.;
|
||||
put x $bpklength.;
|
||||
end;
|
||||
run;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -4582,9 +4582,9 @@ run;
|
||||
|
||||
## `$bplenght.` format/informat <a name="bplenght-formats-50"></a> ######
|
||||
|
||||
## >>> `bplenght` format/informat: <<< <a name="bplenght-format"></a> #######################
|
||||
## >>> `bplength` format/informat: <<< <a name="bplength-format"></a> #######################
|
||||
|
||||
The **bplenght** format and informats use the `lengthn()` function
|
||||
The **bplength** format and informats use the `lengthn()` function
|
||||
to count the number of bytes in a word.
|
||||
|
||||
|
||||
@@ -4594,9 +4594,9 @@ to count the number of bytes in a word.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
data work.count_bytes;
|
||||
input x $ 32.;
|
||||
n = input (x, bplenght.);
|
||||
c = input (x, $bplenght.);
|
||||
format x $bplenght.;
|
||||
n = input (x, bplength.);
|
||||
c = input (x, $bplength.);
|
||||
format x $bplength.;
|
||||
cards;
|
||||
ż
|
||||
żó
|
||||
@@ -4631,7 +4631,7 @@ data _null_;
|
||||
length x $ 32767;
|
||||
do i = 32767/3 to 0 by -1111, 10 to 0 by -1;
|
||||
x=repeat("空",i);
|
||||
put x $bplenght.;
|
||||
put x $bplength.;
|
||||
end;
|
||||
run;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user