-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The data sets
Penicillin
and sleepstudy
from {lme4} are now trans…
…lated (en and fr versions).
- Loading branch information
1 parent
e3ed083
commit c360733
Showing
8 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.Penicillin_en <- function(Penicillin, labels_only = FALSE, as_labelled = FALSE) { | ||
|
||
comment(Penicillin) <- c( | ||
"Data set 'Penicillin' from package 'lme4'") | ||
|
||
Penicillin <- labelise(Penicillin, self = FALSE, | ||
label = list( | ||
diameter = "Inhibition zone diameter", | ||
plate = "Assay plate", | ||
sample = "Penicillin sample"), | ||
units = list( | ||
diameter = "mm", | ||
plate = NA, | ||
sample = NA), | ||
as_labelled = as_labelled) | ||
|
||
#if (!isTRUE(labels_only)) { | ||
# Nothing to do! | ||
#} | ||
|
||
Penicillin | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.Penicillin_fr <- function(Penicillin, labels_only = FALSE, as_labelled = FALSE) { | ||
|
||
comment(Penicillin) <- c( | ||
"Jeu de données 'Penicillin' du package 'lme4'") | ||
|
||
Penicillin <- labelise(Penicillin, self = FALSE, | ||
label = list( | ||
diameter = "Diamètre de la zone d'inhibition", | ||
plate = "Boîte de Petri", | ||
sample = "Échantillon de pénicilline"), | ||
units = list( | ||
diameter = "mm", | ||
plate = NA, | ||
sample = NA), | ||
as_labelled = as_labelled) | ||
|
||
#if (!isTRUE(labels_only)) { | ||
# Nothing to do! | ||
#} | ||
|
||
Penicillin | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.sleepstudy_en <- function(sleepstudy, labels_only = FALSE, as_labelled = FALSE) { | ||
|
||
names(sleepstudy) <- c("reaction", "days", "subject") | ||
comment(sleepstudy) <- c( | ||
"Dataset 'sleepstudy' from the package 'lme4' (column names in lowercase)") | ||
|
||
sleepstudy <- labelise(sleepstudy, self = FALSE, | ||
label = list( | ||
reaction = "Reaction time", | ||
days = "Sleep deprivation", | ||
subject = "Subject id"), | ||
units = list( | ||
reaction = "ms", | ||
days = "days", | ||
subject = NA), | ||
as_labelled = as_labelled) | ||
|
||
#if (!isTRUE(labels_only)) { | ||
# Nothing to do! | ||
#} | ||
|
||
sleepstudy | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.sleepstudy_fr <- function(sleepstudy, labels_only = FALSE, as_labelled = FALSE) { | ||
|
||
names(sleepstudy) <- c("reaction", "days", "subject") | ||
comment(sleepstudy) <- c( | ||
"Jeu de données 'sleepstudy' du package 'lme4' (noms de colonnes en minuscules)") | ||
|
||
sleepstudy <- labelise(sleepstudy, self = FALSE, | ||
label = list( | ||
reaction = "Temps de réaction", | ||
days = "Privation de sommeil", | ||
subject = "Id sujet"), | ||
units = list( | ||
reaction = "ms", | ||
days = "jours", | ||
subject = NA), | ||
as_labelled = as_labelled) | ||
|
||
#if (!isTRUE(labels_only)) { | ||
# Nothing to do! | ||
#} | ||
|
||
sleepstudy | ||
} |