Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
arjoon-r committed Aug 22, 2023
1 parent 2dfae78 commit a657b08
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions inst/create_vx_data/vx_dm.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# create dm
library(tibble)
library(dplyr)

dm <- tribble(~USUBJID,~SUBJID,~RFSTDTC,~RFENDTC,~RFXSTDTC,~RFXENDTC,~RFICDTC,~RFPENDTC, ~SITEID, ~INVID, ~INVNAM, ~BRTHDTC, ~AGE, ~AGEU, ~SEX, ~RACE, ~ETHNIC,
"ABC-1001","1001","2021-11-03T10:50:00","2022-04-27","2021-11-03T10:50:00","2021-12-30T09:10:00","2021-10-28","2022-04-27",1001,1328,"Potter, Harry","1947-09-21",74,"YEARS","F","WHITE","NOT HISPANIC OR LATINO",
"ABC-1002","1002","2021-10-07T12:48:00","2022-06-14","2021-10-07T12:48:00","2021-12-16T12:41:00","2021-09-22","2022-06-14",1002,1212,"Gomez, Selena","1951-07-13",70,"YEARS","F","BLACK OR AFRICAN AMERICAN","HISPANIC OR LATINO") %>%
mutate(
STUDYID = "ABC",
DOMAIN = "DM",
DTHDTC = NA_character_,
DTHFL = NA_character_,
ARMCD = 'VAXAB',
ARM = "VACCINE A VACCINE B",
ACTARMCD = 'VAXAB',
ACTARM = "VACCINE A VACCINE B",
COUNTRY = "USA",
DMDTC = NA_character_,
DMDY = NA_integer_
) %>%
#ordering the variables
select(STUDYID,DOMAIN,USUBJID,SUBJID,RFSTDTC,RFENDTC,RFXSTDTC,RFXENDTC,
RFICDTC,RFPENDTC,DTHDTC,DTHFL,SITEID,INVID,INVNAM,BRTHDTC,AGE,AGEU,
SEX,RACE,ETHNIC,ARMCD,ARM,ACTARMCD,ACTARM,COUNTRY,DMDTC,DMDY)
vx_dm <- dm

dir <- tempdir()
save(vx_dm, file = file.path(dir, "vx_dm.rda"), compress = "bzip2")

0 comments on commit a657b08

Please sign in to comment.