tests/rbsb1.demo.file.R

#
# This was added by paquet.pl (version 0.04) (beginning)
#
library("rbsb");
#
# This was added by paquet.pl (version 0.04) (end)
#
chemin <- searchpaths()[grep("rbsb",searchpaths())];
chemin <- paste(chemin,"/files/",sep="");
# creating rbsb S4 object
# 
# 10_02_11 10_03_10 10_06_16 10_06_22 10_09_13
# 10_09_14 10_09_22 11_01_17
#
#

# from an existing text file
if (!exists("chemin")) {
    cat("A file into the private 'files' directory is needed\n");
    erreur("The package must be installed to run this demo");
}

############################################################
form3titre("Reading a simple list from a file");
print(read8list(paste(chemin,"rbsb1.demo.fil3.txt",sep=""),path=""));
pause()

############################################################
form3titre("Reading a simple file in different styles");
print(file2char(paste(chemin,"rbsb1.demo.file.txt",sep=""),path=""));


############################################################
form3titre("Demonstrating the reading of lists from files");

#
ttt <- paste(chemin,"rbsb1.demo.list.txt",sep="");
#
lili <- file2list(ttt,path="");
print(lili);


############################################################
form3titre("Demonstrating the writing of lists to files");

list2file(lili,"toto");
print(readLines("toto"));
lolo <- file2list("toto");
print(lolo);

Try the rbsb package in your browser

Any scripts or data that you put into this service are public.

rbsb documentation built on May 2, 2019, 4:41 p.m.