Skip to content

Commit

Permalink
chore: move this code from intermediate course
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed May 2, 2024
1 parent 5b993f2 commit 2224d9b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions data-raw/intermediate-data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
library(fs)
library(here)
options(timeout = 120)

mmash_link <-
"https://physionet.org/static/published-projects/mmash/multilevel-monitoring-of-activity-and-sleep-in-healthy-people-1.0.0.zip"

download.file(mmash_link, destfile = here("data-raw/mmash-data.zip"))

# usethis::use_git_ignore("data-raw/mmash-data.zip")

unzip(here("data-raw/mmash-data.zip"),
exdir = here("data-raw"),
junkpaths = TRUE
)

Sys.sleep(1)

unzip(here("data-raw/MMASH.zip"),
exdir = here("data-raw")
)

file_delete(here(c(
"data-raw/MMASH.zip", "data-raw/SHA256SUMS.txt", "data-raw/LICENSE.txt"
)))

file_move(here("data-raw/DataPaper"), here("data-raw/mmash"))

# usethis::use_git_ignore("data-raw/mmash/")

zip::zip()

0 comments on commit 2224d9b

Please sign in to comment.