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:
Bart Jablonski
2024-07-24 08:10:07 +02:00
parent 72595e978a
commit 8ceeeaadae
12 changed files with 7628 additions and 19 deletions

View File

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

View File

@@ -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.

7609
hist/2.0.1/baseplus.md Normal file

File diff suppressed because it is too large Load Diff

BIN
hist/2.0.1/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