Canalblog
Editer l'article Suivre ce blog Administration + Créer mon blog
Publicité
Epi Info en Version Française
Epi Info en Version Française
  • Ce site est consacré à la version française du logiciel épidémiologique Epi Info™. Il est réalisé par David Moreau, Statisticien Epidémiologiste. This blog is dedicated to Epi Info™ french version software, but some technical comments are also in english.
  • Accueil du blog
  • Créer un blog avec CanalBlog
Publicité
Archives
Visiteurs
Depuis la création 396 955
11 mars 2011

Importing data from Epi Info to R statistical software

800px_Flag_of_the_United_Kingdom To import data from Epi Info™ to R, you need functions for reading data stored by Access, the new data format used by Epi Info.

 

Rlogo

These functions are provided in package RODBC. So first, you need to donwload and install package RODBC in R.

Liste_de_Packages

 

Once package RODBC installed, two functions are needed :

  • odbcConnectAccess(), to open connection to Access database (Epi Info Project);
  • sqlFetch(), to read data table inside the current project.

For exemple, if you want to import data from data table named "principal" inside "ISAAC2F" project, which is in "My Documents" folder, use the following codes:

> IsaacProject <- odbcConnectAccess("C:/Documents and Settings/Administrator/My documents/ISAAC2F.MDB")

> IsaacPrincipal <- sqlFetch(IsaacProject,sqtable="principal",colnames=FALSE,rownames=FALSE)
 
Data table "principal" is then be stored in "IsaacPrincipal" R object (1366 subjects and 10 variables):

> dim(IsaacPrincipal)
[1] 1366   10

And variables names are kept:

> dimnames(isaacprincipal)[[2]]
 [1] "identification" "dateentrevue"   "age"            "sexe"           "sifflements"    "crisessiff"   
 [7] "eczema"         "poids"          "taille"         "PM2_5"        

You can then apply statistical tests and statistical models available on R.
 
Remark: these functions  for reading Access data table are only available on R for Windows.

 

Publicité
Publicité
Commentaires
Publicité