Skip to content

Commit 755ae17

Browse files
committed
Data migrated from BioDataScience1
1 parent 41b03b1 commit 755ae17

File tree

13 files changed

+194
-1
lines changed

13 files changed

+194
-1
lines changed

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ Makefile
1313
^\.Rproj\.user$
1414
^.*\.Rproj$
1515
LICENSE.md
16+
17+
data-raw
18+
data-raw/*

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# BioDataScience 2020.0.0
22

33
- Clean up finished. Most code moved to learndown. Learnr tutorials and Shiny
4-
applications moved to BioDataScience1.
4+
applications moved to {BioDataScience1}.
5+
-The datasets`biometry` and `biometrie` are left here.
56
- The package now contains `config()`, `sign_in()` and `sign_out()` only for
67
database access and user identification.
78

R/data.R

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#'Mesure de biometrie humaine
2+
#'
3+
#'Compilation d'un ensemble de mesures biometriques réalisée par les étudiants
4+
#' de l'UMONS dans le cadre du cours de biostatistique et probabilités
5+
#' entre 2013 et 2017.
6+
#'
7+
#' @format Un tableau de données de 7 variables:
8+
#' \describe{
9+
#' \item{\code{genre}}{une variable facteur à deux niveaux :
10+
#' Homme (H) et Femme (F).}
11+
#' \item{\code{ddn}}{Date de naissance (YYYY-MM-DD).}
12+
#' \item{\code{masse}}{Masse des individus (en kg).}
13+
#' \item{\code{taille}}{Taille des individus (en cm).}
14+
#' \item{\code{poignet}}{Circomférence du poignet (en mm).}
15+
#' \item{\code{ddm}}{Date des mesures.}
16+
#' \item{\code{age}}{Age des individus lors de la prise des mesures.}
17+
#' }
18+
#'
19+
#' @examples
20+
#' data(biometrie)
21+
#' class(biometrie)
22+
#' head(biometrie)
23+
#' plot(biometrie)
24+
"biometrie"
25+
26+
#' Measure of human biometry at Hainaut, Belgium
27+
#'
28+
#' Measure of human biometry to study health status with several index
29+
#' as Body Weight Index (BMI) between 2013 an 2017.
30+
#'
31+
#' @format A data frame with 7 variables and 395 observations:
32+
#' \describe{
33+
#' \item{\code{gender}}{A **factor** with two levels: `"Men"`, and `"Women"`.}
34+
#' \item{\code{day_birth}}{Day of birth (YYYY-MM-DD).}
35+
#' \item{\code{weight}}{Weight (in kg).}
36+
#' \item{\code{height}}{Height (in cm).}
37+
#' \item{\code{wrist}}{Wrist circumfernce (in mm).}
38+
#' \item{\code{year_measure}}{Year of the biometric measure.}
39+
#' \item{\code{age}}{Age of people.}
40+
#' }
41+
#'
42+
"biometry"

data-raw/biometrie.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SciViews::R
2+
3+
biometrie <- read(file = "data-raw/biometrie.rds")
4+
biometrie <- filter(biometrie, masse != "NA")
5+
6+
biometrie <- select(biometrie, - year)
7+
#
8+
devtools::use_data(biometrie, overwrite = TRUE)

data-raw/biometrie.rds

23.6 KB
Binary file not shown.

data-raw/biometry.R

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
SciViews::R
2+
3+
biometry <- read(file = "data-raw/biometry.rds")
4+
5+
#rename variable french -> english and filter NA
6+
7+
biometry %>.%
8+
rename(., gender = genre,
9+
day_birth = ddn,
10+
year = year,
11+
weight = masse,
12+
height = taille,
13+
wrist = poignet,
14+
year_measure = ddm,
15+
age = age) %>.%
16+
filter(., weight != "NA") %>.%
17+
select(., - year)-> biometry
18+
19+
## Recodage de biometry$gender
20+
biometry$gender <- recode(biometry$gender,
21+
"H" = "M",
22+
"F" = "W")
23+
24+
#
25+
devtools::use_data(biometry, overwrite = TRUE)

data-raw/biometry.rds

23.6 KB
Binary file not shown.

data/biometrie.rda

3.22 KB
Binary file not shown.

data/biometry.rda

3.26 KB
Binary file not shown.

inst/translation/biometry_en.R

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.biometry_en <- function(biometry, labels_only = FALSE,
2+
as_labelled = FALSE) {
3+
biometry <- labelise(biometry, self = FALSE,
4+
label = list(
5+
gender = "Gender",
6+
day_birth = "Day of birth",
7+
weight = "Weight",
8+
height = "Height",
9+
wrist = "Wrist circumference",
10+
year_measure = "Year of the measure",
11+
age = "Age"),
12+
units = list(
13+
gender = NA,
14+
day_birth = NA,
15+
weight = "kg",
16+
height = "cm",
17+
wrist = "mm",
18+
year_measure = "year",
19+
age = "year"),
20+
as_labelled = as_labelled)
21+
22+
if (!isTRUE(labels_only)) {
23+
levels(biometry$gender) <- c("M", "W")
24+
}
25+
26+
biometry
27+
}

0 commit comments

Comments
 (0)