TD1 Flashcards

(12 cards)

1
Q

Q : À quoi sert la console dans R ?

A

R : À taper et exécuter des commandes immédiatement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Q : Pourquoi utiliser un script plutôt que la console ?

A

R : Pour garder un historique, ajouter des commentaires, réutiliser/modifier facilement le code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Q : Quels sont les trois types élémentaires en R ?

A

R : Numérique, Texte, Logique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Q : Que contient e <- (a > 2) ?

A

R : Un booléen (TRUE ou FALSE) selon la comparaison.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Q : Que fait ! (x > 4) ?

A

R : Retourne le contraire du test : ici, si x <= 4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Q : Quelle est la différence entre & et | ?

A

R : & signifie ET, | signifie OU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Q : Quelle fonction permet d’importer un tableau texte ?

A

R : read.table()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Q : Que signifie header=TRUE ?

A

R : Indique que la première ligne contient les noms de colonnes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Q : Comment accéder à une colonne nommée “Poids_Adulte” ?

A

R : tab$Poids_Adulte ou tab[,4]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Q : Quelle commande crée un histogramme ?

A

R : hist(tab$Poids_Adulte)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Q : Quelle commande permet un boxplot par sexe ?

A

R : boxplot(tab$Poids_Adulte ~ tab$Sexe)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Q : Que produit plot(table(tab$Riviere, tab$Sexe)) ?

A

R : Un graphique croisé entre deux variables qualitatives.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly