II - Langage et jeux de données (version 3.0)
S is developped
1991 R (S clone) is born
1995 GNU License (freedom to use, study, share, copy, and modify the software)
2000 Version 1
2013 version 3
4000+ packages
Easy graphics
Specific for molecular biology and medical data
Reproductibility
2001 Version 1 (15 packages)
2013 Version 3 (750 packages)
a <- 5 #assigning5:10 #fromtomyvec <- c(1,2,4, 5:7) #concatenatemyvec[3] #accessingmyvec[3:5] #multiple accessingmyvec[c(2,6,4)] #multiple accessingmyvec2 <- c("hello", "world") #stringmyvec2[-1] #omittingComparaisons: a == b, a != b, a >= b, a <= b, a > b, a < b
myvec <- c(1,2,4, 5:7) #concatenatemyvec[c(T,F,F,T,T,F)]myvec>2myvec<=6myvec>3 & myvec<=6myvec[myvec>3 & myvec<=6]myvec*3 #operators such as (+ - * / ^2)?log #help functionlog(myvec)sort(myvec)max(myvec)sum(myvec)which(myvec==4)Pour des objets différents
load("file.rdata")data() permet de charger un dataset intégré (i.e. un dataset qui vient avec le logiciel) ex: data(airquality).> correl <- cor(X[,1],X[,2]) #two vectors
> correl2 <- cor(X[,1],X[,-1]) # what does it mean?
> correl3 <- cor(X) #???
Comment interpreter:
Analyse de données biologiques – partie II – Prof. Patrick E. Meyer