Modifications entre les versions 9 et 10
Version 9 à la date du 2006-11-08 16:18:14
Taille: 4495
Commentaire:
Version 10 à la date du 2006-11-08 16:27:07
Taille: 4507
Éditeur: ThomasNoël
Commentaire:
Texte supprimé. Texte ajouté.
Ligne 22: Ligne 22:
$ sudo R CMD INSTALL -l /usr/local/lib/R/site-library/mice_1.14.tar.gz $ cd /tmp
$ sudo R CMD INSTALL -l /usr/local/lib/R/site-library/ mice_1.14.tar.gz

Master pro (M2) Expertise et ingénierie des systèmes d’information en santé

[http://foad.refer.org/rubrique96.html]

Ticket Foad : 161 :

  • Nous avons à utiliser le logiciel de calcul scientifique R (qui est dans la distribution Ubuntu). Pour un enseignement qui aura lieu le 22 novembre nous allons avoir à utiliser le package "mice" de ce logiciel (téléchargeable à l'adresse suivante : http://cran.r-project.org/src/contrib/Descriptions/mice.html). Je ne sais pas si celui-ci est directement intégré dans la distribution Ubuntu, mais je pense que non.

Installation de R puis de la bibliothèque ''mice'' (Dapper ou Edgy)

  1. installer R :
    $ sudo aptitude install r-recommended
  2. télécharger la dernière version depuis http://cran.cict.fr/src/contrib/Descriptions/mice.html (prendre le .tar.gz Package source) :

    $ cd /tmp
    $ wget http://cran.cict.fr/src/contrib/mice_1.14.tar.gz
  3. installer le package :
    $ cd /tmp
    $ sudo R CMD INSTALL -l /usr/local/lib/R/site-library/ mice_1.14.tar.gz
    * Installing *source* package 'mice' ...
    ** R
    ** data
    ** inst
    ** preparing package for lazy loading
    Loading required package: MASS
    Loading required package: nnet
    Loading required package: nlme
    ** help
     >>> Building/Updating help pages for package 'mice'
         Formats: text html latex example 
      complete                          text    html    latex   example
      glm.mids                          text    html    latex   example
    (...)
      nhanes2                           text    html    latex
      pool                              text    html    latex   example
    ** building package indices ...
    * DONE (mice)
  4. tester : lancer R et charger le module
    $ R
    
    R : Copyright 2006, The R Foundation for Statistical Computing
    Version 2.3.1 (2006-06-01)
    ISBN 3-900051-07-0
    
    > library(mice)
    Loading required package: MASS
    Loading required package: nnet
    Loading required package: nlme
    MICE V1.14 library            Copyright (2004) TNO Prevention and Health, Leiden
    This library is distributed under the GNU General Public License (version 2)
    Loading required package: Hmisc
    Warning message:
    there is no package called 'Hmisc' in: library(package, lib.loc = lib.loc, character.only = TRUE, logical = TRUE,  
    > q()
    Save workspace image? [y/n/c]: n 
  5. il semble manquer le module hmisc, qui est lui déjà packagé :
    $ sudo aptitude install r-cran-hmisc
  6. on relance R et on charge le module mice : {{{$ R

R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.1 (2006-06-01) ISBN 3-900051-07-0

> library(mice) Le chargement a nécessité le package : MASS Le chargement a nécessité le package : nnet Le chargement a nécessité le package : nlme MICE V1.14 library Copyright (2004) TNO Prevention and Health, Leiden This library is distributed under the GNU General Public License (version 2) Le chargement a nécessité le package : Hmisc Hmisc library by Frank E Harrell Jr

Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation.

NOTE:Hmisc no longer redefines [.factor to drop unused levels when subsetting. To get the old behavior of Hmisc type dropUnusedLevels().

Attachement du package : 'Hmisc'

  • The following object(s) are masked from package:mice :
    • oldUnclass .R. .SV4.
    The following object(s) are masked from package:stats :
    • ecdf

Attachement du package : 'mice'

  • The following object(s) are masked _by_ package:Hmisc :
    • oldUnclass .R. .SV4.

> }}}

  • MS : (Ce texte est en rose... si si, si j'vous le dis :)) Donc chez moi, cette commande:

$sudo R CMD INSTALL -l /usr/local/lib/R/site-library/mice_1.14.tar.gz

Me sort que le paquet n'existe pas. "-l" étant pour la localisation et ensuite il faut le .gz. Par contre, en déplacant le fichier mice_1.14.tar.gz dans le répertoire "site-library" en question et en virant "-l", ca passe mieux. J'imagine que par défaut le répertoire d'installation est /usr/local/lib/R/site-library, ou que l'installation se fait dans le répertoire ou se trouve l'archive. Bha au final, ca fonctionne quoi.

$sudo mv /tmp/mice_1.14.tar.gz /usr/local/lib/R/site-library/
$sudo R CMD INSTALL /usr/local/lib/R/site-library/mice_1.14.tar.gz

FOAD/EISIS (dernière édition le 2008-11-14 22:13:04 par ThomasNoël)