rbsa-package: Set of basic but convenient functions

Description Details Naming conventions Additional Information Author(s) Examples

Description

The main idea was to provide some convenient functions to avoid some disturbing points when programming with R. Perhaps the most striking example is when you need to make an action on each component of an object and use some loop like for (i in 1:length(object)){...} since later or former the loop will be used with an object of length zero... The rbsa package gives access to

  1. logical looping with bc, bd and bf.

  2. simply building a list from a simply tagged text file; very convenient to parameterize jobs (see read8list).

  3. checking objects and error displaying (object9 and erreur).

  4. pausing to look at intermediate results (pause).

  5. opening and closing of text/graph files (open8text, close8text, open8graph and close8graph).

  6. analyze and handle character vectors seen as text files.

  7. and more facilities of this kind.

It is worth knowing that rbsa has got a series of constants that can be modified by the user:

The name of rbsa comes from rbsb with last letter changed from 'b' to 'a' to indicate that it is only the basic part of rbsb. The denomination of rbsb was a shortcut of rebastaba to indicate that it was the set of auxiliary functions of the package. rebastaba was standing for the French expression of R\'eseaux Bay\'esiens pour la Statistique Bay\'esienne, a finally abandonned project.

Details

After reading the documentation, the best way to get details is first to try the functions, second to look at their code in the files *.code.r which are stored in the directory inst. Most of the time the programming is quite straightforward and always commented.

Naming conventions

The object denomination follows optional rules defined for documair, a package to build package tar.gz files. The main idea is to concatenate keywords with digits, loading the digits with some operating meaning.

More explanations are given in documair presentation.

Additional Information

Author(s)

Jean-Baptiste Denis (MIAj - Inra - Jouy-en-Josas).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 
library(rbsa) 
for (ii in bf(letters)) { 
cat(ii,letters[ii],"|",sep="") 
} 
cat("Look at the result\n"); 
cat("Try the interactive command:", 
" \"pause('To end the process'", 
",top=c('yes','oui','si'))\"\n"); 
open8text(FALSE); 
cat(letters,"\n"); 
close8text(); 
cat(bc(4),"\n"); 
open8text(FALSE); 
cat(LETTERS,"\n"); 
close8text(); 
cat("Look at the newly created text file\n"); 

rbsa documentation built on May 2, 2019, 6:07 p.m.