Labo 2 - Statistiques univariées


In [5]:
%reload_ext rpy2.ipython

import pandas as pd


The rpy2.ipython extension is already loaded. To reload it, use:
  %reload_ext rpy2.ipython

Aide


In [ ]:
%%R
# help()
# help(function)
# help(package='package-name)

Paquets


In [ ]:
%%R
# install
# install.packages('package-name')

# already installed with conda
#install.packages("foreign")
#install.packages("Rcmdr", dependencies = TRUE)

# new installs
install.packages("nortest", repos="http://cran.rstudio.com/")
install.packages("sas7bdat", repos="http://cran.rstudio.com/")
install.packages("Hmisc", repos="http://cran.rstudio.com/")
install.packages("pastecs", repos="http://cran.rstudio.com/")

In [ ]:
%%R
# import
# library('package-name')

library(foreign)
library(nortest)
library(sas7bdat)
library(Hmisc)
library(pastecs)

Espace de travail


In [3]:
# jupyter "magic : integration with shell
%pwd


Out[3]:
'/home/inrs/EUR8217/labos'

Import fichier externe


In [ ]:
%%R
# import excel : via txt tab separated
fichierTexte <- read.table("data/labo-2/SR_Data.txt", header = TRUE)
head(fichierTexte)

In [ ]:

Structuration d'un tableau

Variable centré-réduite

Fonctions statistiques