knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
This package imports data from Apple Health. It is usuable for basic analyses at the moment, but still in an early state. Expect that the user inferface is still subject to potentially major changes.
At the moment healthieR
is not on CRAN, but can be installed from my
drat repository:
install.packages("drat") drat::addRepo("paulstaab") install.packages("healthieR")
To import the data, enter the Path the the Export.zip archive here
zip_file <- "./Export.zip"
zip_file <- system.file("example_data/Export.zip", package = "healthieR")
and load use the read_apple_health
function to convert it into an format
that we can query from R
later:
library(healthieR) health_data <- read_apple_health(zip_file) health_data
You can new use the extract functions to optain different parts of your data
as a data.frame
;
suppressPackageStartupMessages(library(dplyr)) health_data %>% extract_steps() health_data %>% extract_weight()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.