Skip to content

Commit f9e69e5

Browse files
author
maechler
committed
add gait data set
git-svn-id: https://svn.r-project.org/R/trunk@87723 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 2ec482f commit f9e69e5

File tree

5 files changed

+92
-5
lines changed

5 files changed

+92
-5
lines changed

doc/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@
199199

200200
\item The documentation of \code{gamma} and \code{is.numeric} is more
201201
specific, thanks to the contributors of \PR{18677}.
202+
203+
\item New dataset \code{gait} thanks to \I{Heather Turner} and \I{Ella Kaye}.
202204
}
203205
}
204206

src/library/datasets/data/gait.rda

2.49 KB
Binary file not shown.

src/library/datasets/man/gait.Rd

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
\name{gait}
2+
\title{Hip and Knee Angle while Walking}
3+
\docType{data}
4+
\alias{gait}
5+
\description{
6+
Hip and knee angle (in degrees) through a 20 point movement cycle for 39 boys.
7+
}
8+
\usage{gait}
9+
\format{
10+
A 3-dimensional array with dimensions \code{c(20, 39, 2)} giving the
11+
\code{"Hip Angle"} and \code{"Knee Angle"} (in degrees) for 39 repetitions of
12+
a 20 point gait cycle (over standardized gait times).
13+
}
14+
\details{
15+
The named components of \code{\link{dimnames}(gait)} are as follows:
16+
\describe{
17+
\item{\code{Time}}{\code{seq(from = 0.025, to = 0.975, by = 0.05)}}
18+
\item{\code{Subject}}{\code{"boy1"}, \code{"boy2"}, ..., \code{"boy39"}}
19+
\item{\code{Variable}}{\code{"Hip Angle"} and \code{"Knee Angle"}}
20+
}
21+
}
22+
\references{
23+
Olshen, R. A., Biden, E. N., Wyatt, M. P., and Sutherland, D. (1989)
24+
Gait Analysis and the Bootstrap.
25+
\emph{Annals of Statistics} \bold{17}, 4, 1419--1440.
26+
\doi{10.1214/AOS/1176347372}
27+
28+
Ramsay, J. O., and Silverman, B. W. (2006)
29+
\emph{Functional Data Analysis}, 2nd ed., New York: Springer.
30+
31+
Ramsay, J. (2023) \emph{fda: Functional Data Analysis}.
32+
R package version 6.1.4, \url{https://CRAN.R-project.org/package=fda}.
33+
}
34+
\source{
35+
In the FDA book (2006), p.8, \emph{\dQuote{The Motion Analysis Laboratory at
36+
Children's Hospital, San Diego, collected these data}}.
37+
}
38+
\note{
39+
This is the version of the data as in the \CRANpkg{fda} package and
40+
corresponding textbooks, but with named dimensions. One record appears to be
41+
duplicated from the original paper, Olshen \emph{et al.} (1989), which
42+
analyses a sample of 38 boys. The \code{gait} dataset has 39 boys but
43+
\code{boy19} and \code{boy26} have identical measurements.
44+
}
45+
\examples{
46+
plot(gait[, 1, ], type = "b",
47+
xlim = range(gait[,,1]), ylim = range(gait[,,2]),
48+
xlab = "Hip Angle", ylab = "Knee Angle", main = "'gait' data : Boy 1")
49+
mtext("all other boys", col = "thistle"); grid()
50+
matlines(gait[, -1, 1], gait[, -1, 2], type = "l", lty = 1, col = adjustcolor("thistle", 1/3))
51+
52+
## The data array, two matrices :
53+
op <- options(width = 128) # on a wide console
54+
aperm(gait, c(2:1, 3))
55+
options(op)
56+
}
57+
\keyword{datasets}

tests/Examples/datasets-Ex.Rout.save

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
R Under development (unstable) (2024-11-12 r87322) -- "Unsuffered Consequences"
3-
Copyright (C) 2024 The R Foundation for Statistical Computing
4-
Platform: aarch64-apple-darwin24.1.0
2+
R Under development (unstable) (2025-02-15 r87721) -- "Unsuffered Consequences"
3+
Copyright (C) 2025 The R Foundation for Statistical Computing
4+
Platform: x86_64-pc-linux-gnu
55

66
R is free software and comes with ABSOLUTELY NO WARRANTY.
77
You are welcome to redistribute it under certain conditions.
@@ -2450,6 +2450,27 @@ F-statistic: 4354 on 4 and 34 DF, p-value: < 2.2e-16
24502450
>
24512451
> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
24522452
> cleanEx()
2453+
> nameEx("gait")
2454+
> ### * gait
2455+
>
2456+
> flush(stderr()); flush(stdout())
2457+
>
2458+
> ### Name: gait
2459+
> ### Title: Hip and Knee Angle while Walking
2460+
> ### Aliases: gait
2461+
> ### Keywords: datasets
2462+
>
2463+
> ### ** Examples
2464+
>
2465+
> plot(gait[, 1, ], type = "b",
2466+
+ xlim = range(gait[,,1]), ylim = range(gait[,,2]),
2467+
+ xlab = "Hip Angle", ylab = "Knee Angle", main = "'gait' data : Boy 1")
2468+
> mtext("all other boys", col = "thistle"); grid()
2469+
> matlines(gait[, -1, 1], gait[, -1, 2], type = "l", lty = 1, col = adjustcolor("thistle", 1/3))
2470+
>
2471+
>
2472+
>
2473+
> cleanEx()
24532474
> nameEx("infert")
24542475
> ### * infert
24552476
>

tests/datasets.Rout.save

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
R Under development (unstable) (2024-11-12 r87322) -- "Unsuffered Consequences"
3-
Copyright (C) 2024 The R Foundation for Statistical Computing
2+
R Under development (unstable) (2025-02-15 r87721) -- "Unsuffered Consequences"
3+
Copyright (C) 2025 The R Foundation for Statistical Computing
44
Platform: x86_64-pc-linux-gnu
55

66
R is free software and comes with ABSOLUTELY NO WARRANTY.
@@ -447,6 +447,13 @@ List of 3
447447
** structure of dataset freeny.y
448448
Time-Series [1:39] from 1962 to 1972: 8.79 8.79 8.81 8.81 8.91 ...
449449

450+
** structure of dataset gait
451+
num [1:20, 1:39, 1:2] 37 36 33 29 23 18 15 12 9 6 ...
452+
- attr(*, "dimnames")=List of 3
453+
..$ Time : chr [1:20] "0.025" "0.075" "0.125" "0.175" ...
454+
..$ Subject : chr [1:39] "boy1" "boy2" "boy3" "boy4" ...
455+
..$ Variable: chr [1:2] "Hip Angle" "Knee Angle"
456+
450457
** structure of dataset infert
451458
'data.frame': 248 obs. of 8 variables:
452459
$ education : Factor w/ 3 levels "0-5yrs","6-11yrs",..: 1 1 1 1 2 2 2 2 2 2 ...

0 commit comments

Comments
 (0)