• Aucun résultat trouvé

Christophe Genolini

N/A
N/A
Protected

Academic year: 2022

Partager "Christophe Genolini"

Copied!
15
0
0

Texte intégral

(1)

CONSTRUIRE UN PACKAGE AVEC R

Christophe Genolini

(2)

Qu’est ce qu’un package ?

1. Programme 2. Données 3. Aides

+

4. Informations générales

(3)

0. Idée

Vous avez une idée ?

Personne avant vous ? (forum)

Allez-y !

(4)

1. Programme

Bonnes pratiques : nom des variables

> n <- c(9,18,5,14)

> a <- c(17,18,18,17)

> nn <- 4

> (m <- sum(n)/a)

> (m <- sum(n)/a)

[1] 2.705882 2.555556 2.555556 2.705882

> noteEleves <- c(9,18,5,14)

> ageEleves <- c(17,18,18,17)

> nombreEleves <- 4

> (moyenneNotes <- sum(noteEleves)/ageEleves) [1] 2.705882 2.555556 2.555556 2.705882

(5)

1. Programme

Bonnes pratiques : indentation

for(x in 1:100){if(note[x]<10){if(note[x]<8){cat("Fail") }else{cat("You get it")}}

for(x in 1:100){

if(note[x]<10){

if(note[x]<8){

cat("Fail") }else{

cat("You get it") }

}

for(x in 1:100){

if(note[x]<10){

if(note[x]<8){

cat("Fail") }else{}

}else{

cat("You get it") }

}

(6)

2. Données

Tester le programme

Présenter des exemples

Être le plus général possible

11/ 12 / 12 / 22 / 33 / 44/ 36 / 71/ 101 / 121/ 1252/ 142 / 262 / 313/ 494 / 3176 / 721 / 10002 / 1215/ 1821 / 316 / 259 / 38/ 420 / 3016/ 783 / 1010 / 126 / 912 / 812 / 722 / 733 / 644 / 536 / 273 / 10111 / 10212 / 10313

23/ 30 / 4-2// 02 / 00/ 0-1 // -52/ -30/ -10-1

(7)

4. Informations générales

DESCRIPTION

Package: packClassic Type: Package

Title: Toy example of Pack Classic Version: 0.5.2

Version: 0.5.2 Date: 2009-10-15

Author: Christophe Genolini

Maintainer: Christophe Genolini <[email protected]>

Description: This package is an example of very simple package License: GPL (>=2.0)

LazyLoad: yes Depends: graphics

URL: www.r-project.org

(8)

La DOC !!!

3. Plus que…

(9)

3. La doc, la doc, la doc !!!

(10)

Fini ! (ou presque)

/packClassic/

DESCRIPTION NAMESPACE

Read-and-delete-me /data/

dataAges.rda /man/

/man/

packClassic-package.Rd privateA.Rd

privateC.Rd publicA.Rd publicC.Rd /R/

progClassic.R

(11)

Presque :

Compilation du package

Perl

Latex

Rtools

HTML Help Workshop

HTML Help Workshop

FTP sur le CRAN

FINI !!!

(12)

Options

• Inclusion de code compilé (C, Fortran,…)

• Fonctions privées et publiques

• Programmation objet

• Programmation objet

• Tests automatiques

(13)

Biblio

(14)

Biblio

(15)

Biblio

Références

Documents relatifs

The system equipment manual provides overall system equipment descriptions for the keyboard, control unit chassis, arrl display unit.. Individual assembly/subassembly

These newsletters contain informati.qn applicable to software available from Di-gitaPs Program Library, Articles in Digital Software News update the cumulative

Ces tableaux sont faits à l’intérieur d’une image PsTricks ce qui permet d’avoir toute la puissance de ces packages pour créer des tableaux complexes.. Table

THESE DIMENSIONS APPLY TO THE FLAT SECTION OF THE ALLOWABLE MOLD PROTRUSION IS 0.254 MM ON D1 AND E1 DATUMS A, B AND D TO BE DETERMINED AT DATUM PLANE H.. DIMENSIONS D1 AND E1 DO

The XENIX file transfer program, ~, can transfer files between two Altos Computer systems running the XENIX operating system... The sending/receiving port numbers

The Disassembler Executable File contains the compiled and linked software for disassembly of a specific microprocessor type on the CLAS 4000.. The file format is structured so that

The Green source color devices are made with Gallium Phosphide Green Light Emitting Diode... θ1/2 is the angle from optical centerline where the luminous intensity is 1/2 the

Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body,or (b) support or sustain life, and (c) whose failure to