BrianNathanWhite / OpenLong

Shares Synthetic Longitudinal Data And Code For Formatting Real Data
Other
2 stars 3 forks source link

`read_baseline` and `read_longitudinal` function for MESA #15

Closed bcjaeger closed 4 months ago

bcjaeger commented 5 months ago

This function should read in all relevant MESA data for baseline, and store their data in the components slot of the data object.

A brief review of the OpenLongData.R file will be helpful.

Here is what 'finished' would look like:

  1. The read_baseline function for MESA will be filled in. Here is what it currently shows:
S7::method(read_baseline, OpenLongMesa) <- function(x){
  # TODO: Simar to add code here for loading baseline files
  # the code below reads in one file given a valid filepath.
  # readr::read_csv(file = file.path(x@filepath,
  #                                  "Primary",
  #                                  "Exam1",
  #                                  "Data",
  #                                  "mesae1ecgcw_drepos_20201102.csv"),
  #                 show_col_types = FALSE)
  tibble::tibble()
}

Note that this function returns a tibble currently but it should return a list of tibbles when this is finished.

The approach for read_longitudinal is the same, but it should incorporate all files needed to create the longitudinal version of the data.

Note that this issue should not be worked on until PR #14 is merged.

bcjaeger commented 5 months ago

@simar7511 👋

Would you like to work on a PR to fix this issue? I'll be around by e-mail or teams if you'd like to chat.