About

This illustration accompanies the publication “A Gentle Introduction and Application of Feature-Based Clustering with Psychological Time Series”. The aim of this illustration website is to offer a transparent, open, and accessible repository providing annotated code for all analysis steps.

Open Data

We provide all data necessary to replicate the full results of the main manuscript as well as this illustration. We specifically provide a minial reproducible dataset that includes all variables necessary to perform the analysis, while still protecting the privacy and confidentiality of the participants. All data is available as part of our Open Science repository (Masked for Peer Review, 2023a).

Open Code

The full code of this illustration as well as the main manuscript is available as part of our GitHub repository (Masked for Peer Review, 2023b). A minimal version of the code as well as an archive file are available in our Open Science repository (Masked for Peer Review, 2023a). For convenience purposes, we have also collected a number of functions we created as part of the illustration as an R-package. This package is available as its own GitHub repository and can be downloaded with the devtools package devtools::install_github("JannisCodes/tsFeatureExtracR"), you can also download the R package here (Masked for Peer Review, 2023c).

Software Information

The full session information with all relevant system information and all loaded and installed packages is available in the collapsible section below.

System Info

R environment session info for reproducibility of results
Setting Value
version R version 4.3.0 (2023-04-21)
os macOS 14.3.1
system x86_64, darwin20
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Amsterdam
date 2024-03-07
pandoc 3.1.3 @ /usr/local/bin/ (via rmarkdown)

Package Info

Package info for reproducibility of results
Package Loaded version Date Source
bibtex 0.5.1 2023-01-26 CRAN (R 4.3.0)
devtools 2.4.5 2022-10-11 CRAN (R 4.3.0)
dplyr 1.1.4 2023-11-17 CRAN (R 4.3.0)
factoextra 1.0.7 2020-04-01 CRAN (R 4.3.0)
forcats 1.0.0 2023-01-29 CRAN (R 4.3.0)
fpc 2.2-10 2023-01-07 CRAN (R 4.3.0)
ggplot2 3.5.0 2024-02-23 CRAN (R 4.3.2)
grateful 0.2.0 2023-04-24 CRAN (R 4.3.0)
htmltools 0.5.7 2023-11-03 CRAN (R 4.3.0)
kableExtra 1.3.4 2021-02-20 CRAN (R 4.3.0)
knitcitations 1.0.12 2021-01-10 CRAN (R 4.3.0)
knitr 1.42 2023-01-25 CRAN (R 4.3.0)
lubridate 1.9.2 2023-02-10 CRAN (R 4.3.0)
NbClust 3.0.1 2022-05-02 CRAN (R 4.3.0)
pander 0.6.5 2022-03-18 CRAN (R 4.3.0)
plotly 4.10.4 2024-01-13 CRAN (R 4.3.0)
purrr 1.0.2 2023-08-10 CRAN (R 4.3.0)
readr 2.1.5 2024-01-10 CRAN (R 4.3.0)
readxl 1.4.2 2023-02-09 CRAN (R 4.3.0)
reshape 0.8.9 2022-04-12 CRAN (R 4.3.0)
rmarkdown 2.23 2023-07-01 CRAN (R 4.3.0)
stringr 1.5.1 2023-11-14 CRAN (R 4.3.0)
tibble 3.2.1 2023-03-20 CRAN (R 4.3.0)
tidyr 1.3.1 2024-01-24 CRAN (R 4.3.2)
tidyverse 2.0.0 2023-02-22 CRAN (R 4.3.0)
tsFeatureExtracR 0.1.0 2024-03-01 Github (JannisCodes/tsFeatureExtracR@2a8fa5f1cb87350e3c439335c9620d185f00b03b)
usethis 2.2.2 2023-07-06 CRAN (R 4.3.0)

Full Session Info (including loaded but unattached packages — for troubleshooting only)

R version 4.3.0 (2023-04-21)

Platform: x86_64-apple-darwin20 (64-bit)

locale: en_US.UTF-8||en_US.UTF-8||en_US.UTF-8||C||en_US.UTF-8||en_US.UTF-8

attached base packages:

  • stats
  • graphics
  • grDevices
  • utils
  • datasets
  • methods
  • base

other attached packages:

  • bibtex(v.0.5.1)
  • grateful(v.0.2.0)
  • knitcitations(v.1.0.12)
  • pander(v.0.6.5)
  • devtools(v.2.4.5)
  • usethis(v.2.2.2)
  • NbClust(v.3.0.1)
  • htmltools(v.0.5.7)
  • plotly(v.4.10.4)
  • reshape(v.0.8.9)
  • readxl(v.1.4.2)
  • fpc(v.2.2-10)
  • factoextra(v.1.0.7)
  • tsFeatureExtracR(v.0.1.0)
  • kableExtra(v.1.3.4)
  • lubridate(v.1.9.2)
  • forcats(v.1.0.0)
  • stringr(v.1.5.1)
  • dplyr(v.1.1.4)
  • purrr(v.1.0.2)
  • readr(v.2.1.5)
  • tidyr(v.1.3.1)
  • tibble(v.3.2.1)
  • ggplot2(v.3.5.0)
  • tidyverse(v.2.0.0)
  • knitr(v.1.42)
  • rmarkdown(v.2.23)

loaded via a namespace (and not attached):

  • rstudioapi(v.0.14)
  • jsonlite(v.1.8.8)
  • shape(v.1.4.6.1)
  • magrittr(v.2.0.3)
  • jomo(v.2.7-6)
  • modeltools(v.0.2-23)
  • nloptr(v.2.0.3)
  • fs(v.1.6.3)
  • vctrs(v.0.6.5)
  • RefManageR(v.1.4.0)
  • memoise(v.2.0.1)
  • minqa(v.1.2.6)
  • webshot(v.0.5.4)
  • broom(v.1.0.5)
  • cellranger(v.1.1.0)
  • mitml(v.0.4-5)
  • htmlwidgets(v.1.6.2)
  • plyr(v.1.8.8)
  • cachem(v.1.0.8)
  • mime(v.0.12)
  • lifecycle(v.1.0.4)
  • iterators(v.1.0.14)
  • pkgconfig(v.2.0.3)
  • Matrix(v.1.6-5)
  • R6(v.2.5.1)
  • fastmap(v.1.1.1)
  • shiny(v.1.8.0)
  • digest(v.0.6.34)
  • colorspace(v.2.1-0)
  • pkgload(v.1.3.4)
  • fansi(v.1.0.6)
  • timechange(v.0.2.0)
  • httr(v.1.4.6)
  • mgcv(v.1.8-42)
  • compiler(v.4.3.0)
  • remotes(v.2.4.2)
  • withr(v.3.0.0)
  • backports(v.1.4.1)
  • psych(v.2.4.1)
  • highr(v.0.10)
  • pkgbuild(v.1.4.3)
  • pan(v.1.9)
  • MASS(v.7.3-58.4)
  • sessioninfo(v.1.2.2)
  • tools(v.4.3.0)
  • prabclus(v.2.3-2)
  • httpuv(v.1.6.11)
  • nnet(v.7.3-18)
  • glue(v.1.7.0)
  • nlme(v.3.1-162)
  • promises(v.1.2.0.1)
  • grid(v.4.3.0)
  • cluster(v.2.1.6)
  • generics(v.0.1.3)
  • gtable(v.0.3.4)
  • tzdb(v.0.4.0)
  • class(v.7.3-21)
  • data.table(v.1.14.8)
  • hms(v.1.1.3)
  • xml2(v.1.3.4)
  • utf8(v.1.2.4)
  • flexmix(v.2.3-19)
  • ggrepel(v.0.9.3)
  • foreach(v.1.5.2)
  • pillar(v.1.9.0)
  • later(v.1.3.1)
  • robustbase(v.0.99-0)
  • splines(v.4.3.0)
  • lattice(v.0.21-8)
  • survival(v.3.5-5)
  • tidyselect(v.1.2.0)
  • miniUI(v.0.1.1.1)
  • svglite(v.2.1.1)
  • stats4(v.4.3.0)
  • xfun(v.0.39)
  • diptest(v.0.76-0)
  • DEoptimR(v.1.0-14)
  • stringi(v.1.8.3)
  • lazyeval(v.0.2.2)
  • yaml(v.2.3.7)
  • boot(v.1.3-28.1)
  • evaluate(v.0.23)
  • codetools(v.0.2-19)
  • kernlab(v.0.9-32)
  • cli(v.3.6.2)
  • rpart(v.4.1.19)
  • xtable(v.1.8-4)
  • systemfonts(v.1.0.4)
  • munsell(v.0.5.0)
  • Rcpp(v.1.0.12)
  • parallel(v.4.3.0)
  • ellipsis(v.0.3.2)
  • mclust(v.6.0.0)
  • profvis(v.0.3.8)
  • urlchecker(v.1.0.1)
  • lme4(v.1.1-35.1)
  • glmnet(v.4.1-8)
  • viridisLite(v.0.4.2)
  • ggthemes(v.5.1.0)
  • scales(v.1.3.0)
  • rlang(v.1.1.3)
  • rvest(v.1.0.3)
  • mnormt(v.2.1.1)
  • mice(v.3.16.0)

References

(R Core Team, 2023) (Francois & Hernangómez, 2023) (Wickham et al., 2022) (Wickham, François, et al., 2023) (Kassambara & Mundt, 2020) (Wickham, 2023a) (Hennig, 2023) (Wickham, Chang, et al., 2024) (Rodriguez-Sanchez & Jackson, 2023) (Cheng et al., 2023) (Zhu, 2021) (Boettiger, 2021) (Xie, 2023) (Spinu et al., 2023) (Charrad et al., 2022) (Daróczi & Tsegelskyi, 2022) (Sievert et al., 2024) (Wickham & Henry, 2023) (Wickham, Hester, et al., 2024) (Wickham & Bryan, 2023) (Wickham, 2022) (Allaire et al., 2023) (Wickham, 2023b) (Müller & Wickham, 2023) (Wickham, Vaughan, et al., 2024) (Wickham, 2023c) (Kreienkamp, 2024) (Wickham, Bryan, et al., 2023) (Wickham, 2016) (Francisco Rodríguez-Sánchez et al., 2023) (Xie, 2015) (Xie, 2014) (Grolemund & Wickham, 2011) (Charrad et al., 2014) (Sievert, 2020) (Wickham, 2007) (Xie et al., 2018) (Xie et al., 2020) (Wickham et al., 2019)
Allaire, J., Xie, Y., Dervieux, C., McPherson, J., Luraschi, J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W., & Iannone, R. (2023). Rmarkdown: Dynamic documents for r. https://CRAN.R-project.org/package=rmarkdown
Boettiger, C. (2021). Knitcitations: Citations for knitr markdown files. https://github.com/cboettig/knitcitations
Charrad, M., Ghazzali, N., Boiteau, V., & Niknafs, A. (2014). NbClust: An R package for determining the relevant number of clusters in a data set. Journal of Statistical Software, 61(6), 1–36. https://www.jstatsoft.org/v61/i06/
Charrad, M., Ghazzali, N., Boiteau, V., & Niknafs, A. (2022). NbClust: Determining the best number of clusters in a data set. https://sites.google.com/site/malikacharrad/research/nbclust-package
Cheng, J., Sievert, C., Schloerke, B., Chang, W., Xie, Y., & Allen, J. (2023). Htmltools: Tools for HTML. https://CRAN.R-project.org/package=htmltools
Daróczi, G., & Tsegelskyi, R. (2022). Pander: An r pandoc writer. https://rapporter.github.io/pander/
Francisco Rodríguez-Sánchez, Connor P. Jackson, & Shaurita D. Hutchins. (2023). Grateful: Facilitate citation of r packages. https://github.com/Pakillo/grateful
Francois, R., & Hernangómez, D. (2023). Bibtex: Bibtex parser. https://CRAN.R-project.org/package=bibtex
Grolemund, G., & Wickham, H. (2011). Dates and times made easy with lubridate. Journal of Statistical Software, 40(3), 1–25. https://www.jstatsoft.org/v40/i03/
Hennig, C. (2023). Fpc: Flexible procedures for clustering. https://www.unibo.it/sitoweb/christian.hennig/en/
Kassambara, A., & Mundt, F. (2020). Factoextra: Extract and visualize the results of multivariate data analyses. http://www.sthda.com/english/rpkgs/factoextra
Kreienkamp, J. (2024). tsFeatureExtracR: Functions for feature extraction, feature missingness analysis and imputation.
Masked for Peer Review. (2023a). Feature-Based Clustering of Psychological Time Series [OSF repository: Materials, data, code]. https://osf.io/j8dzv/?view_only=c765efa51e6545e588b29999611eb789
Masked for Peer Review. (2023b). Migration-trajectories [GitHub repository: Materials, computer code].
Masked for Peer Review. (2023c). tsFeatureExtracR. doi.org/10.5281/zenodo.8221675
Müller, K., & Wickham, H. (2023). Tibble: Simple data frames. https://CRAN.R-project.org/package=tibble
R Core Team. (2023). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/
Rodriguez-Sanchez, F., & Jackson, C. P. (2023). Grateful: Facilitate citation of r packages. https://pakillo.github.io/grateful/
Sievert, C. (2020). Interactive web-based data visualization with r, plotly, and shiny. Chapman; Hall/CRC. https://plotly-r.com
Sievert, C., Parmer, C., Hocking, T., Chamberlain, S., Ram, K., Corvellec, M., & Despouy, P. (2024). Plotly: Create interactive web graphics via plotly.js. https://CRAN.R-project.org/package=plotly
Spinu, V., Grolemund, G., & Wickham, H. (2023). Lubridate: Make dealing with dates a little easier. https://CRAN.R-project.org/package=lubridate
Wickham, H. (2007). Reshaping data with the reshape package. Journal of Statistical Software, 21(12). https://www.jstatsoft.org/v21/i12/
Wickham, H. (2016). ggplot2: Elegant graphics for data analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org
Wickham, H. (2022). Reshape: Flexibly reshape data. http://had.co.nz/reshape
Wickham, H. (2023a). Forcats: Tools for working with categorical variables (factors). https://CRAN.R-project.org/package=forcats
Wickham, H. (2023b). Stringr: Simple, consistent wrappers for common string operations. https://CRAN.R-project.org/package=stringr
Wickham, H. (2023c). Tidyverse: Easily install and load the tidyverse. https://CRAN.R-project.org/package=tidyverse
Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L. D., François, R., Grolemund, G., Hayes, A., Henry, L., Hester, J., Kuhn, M., Pedersen, T. L., Miller, E., Bache, S. M., Müller, K., Ooms, J., Robinson, D., Seidel, D. P., Spinu, V., … Yutani, H. (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686. https://doi.org/10.21105/joss.01686
Wickham, H., & Bryan, J. (2023). Readxl: Read excel files. https://CRAN.R-project.org/package=readxl
Wickham, H., Bryan, J., Barrett, M., & Teucher, A. (2023). Usethis: Automate package and project setup. https://CRAN.R-project.org/package=usethis
Wickham, H., Chang, W., Henry, L., Pedersen, T. L., Takahashi, K., Wilke, C., Woo, K., Yutani, H., Dunnington, D., & van den Brand, T. (2024). ggplot2: Create elegant data visualisations using the grammar of graphics. https://CRAN.R-project.org/package=ggplot2
Wickham, H., François, R., Henry, L., Müller, K., & Vaughan, D. (2023). Dplyr: A grammar of data manipulation. https://CRAN.R-project.org/package=dplyr
Wickham, H., & Henry, L. (2023). Purrr: Functional programming tools. https://CRAN.R-project.org/package=purrr
Wickham, H., Hester, J., & Bryan, J. (2024). Readr: Read rectangular text data. https://CRAN.R-project.org/package=readr
Wickham, H., Hester, J., Chang, W., & Bryan, J. (2022). Devtools: Tools to make developing r packages easier. https://CRAN.R-project.org/package=devtools
Wickham, H., Vaughan, D., & Girlich, M. (2024). Tidyr: Tidy messy data. https://CRAN.R-project.org/package=tidyr
Xie, Y. (2014). Knitr: A comprehensive tool for reproducible research in R. In V. Stodden, F. Leisch, & R. D. Peng (Eds.), Implementing reproducible computational research. Chapman; Hall/CRC.
Xie, Y. (2015). Dynamic documents with R and knitr (2nd ed.). Chapman; Hall/CRC. https://yihui.org/knitr/
Xie, Y. (2023). Knitr: A general-purpose package for dynamic report generation in r. https://yihui.org/knitr/
Xie, Y., Allaire, J. J., & Grolemund, G. (2018). R markdown: The definitive guide. Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown
Xie, Y., Dervieux, C., & Riederer, E. (2020). R markdown cookbook. Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown-cookbook
Zhu, H. (2021). kableExtra: Construct complex table with kable and pipe syntax. https://CRAN.R-project.org/package=kableExtra