Skip to content

Commit

Permalink
Add field annotations
Browse files Browse the repository at this point in the history
ref #360
  • Loading branch information
wibeasley committed Nov 3, 2021
1 parent 9dc3fb4 commit 9c14f5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inst/test-data/super-wide-3/generate-dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ ds <-
`Identifier?` = dplyr::if_else(variable_index %% 4 == 0L, "y", ""),
`Required Field?` = dplyr::if_else(variable_index %% 2 == 0L & `Field Type` != "descriptive", "y", ""),
`Custom Alignment` = dplyr::if_else(variable_index %% 5 == 0L, "RH", ""),
) |>
dplyr::mutate(
`Field Annotation` = dplyr::if_else(variable_index %% 6 == 0L, " @READONLY", ""),
`Field Annotation` = dplyr::if_else(variable_index %% 7 == 0L, " @HIDDEN", ""),
`Field Annotation` = dplyr::if_else(variable_index %% 8 == 0L, " @SHARED", ""),
`Field Annotation` = dplyr::if_else(variable_index %% 9 == 0L, " @DEFAULT='-1'", ""),
`Field Annotation` = dplyr::if_else(variable_index %% 10 == 0L, " @NOW", ""),
)

ds$variable_index <- NULL # Drop before writing to disk.
Expand Down

0 comments on commit 9c14f5d

Please sign in to comment.