data-raw/create-frame-dataframe.R

# Schematic diagram of screen matrix and indices of interest
# Note that this is as would be printed in the console (row 1 at the top)
# For plotting, the y-axis will need to be reversed
#
# -     -      1  ----- ------------------------------------------------
# |     |               ||||||||||||||||||||||||||||||||||||||||||||||||
# |     16              ||||||||||||||||||||||||||||||||||||||||||||||||
# |     |               ||||||||||||||||||||||||||||||||||||||||||||||||
# |     -      16 ----- |||||||----------------------------------|||||||
# |     -      17 ----- |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# 144   112             |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     |               |||||||                                  |||||||
# |     -      128 ---- |||||||                                  |||||||
# |     -      129 ---- |||||||----------------------------------|||||||
# |     |               ||||||||||||||||||||||||||||||||||||||||||||||||
# |     16              ||||||||||||||||||||||||||||||||||||||||||||||||
# |     |               ||||||||||||||||||||||||||||||||||||||||||||||||
# -     -      144 ---- ------------------------------------------------
#                       |    | |                                | |    |
#                       |    | |                                | |    |
#                       |    | |                                | |    |
#                       1   16 17                             144 145  160
#
#
#                       |-16-| |--------------128---------------| |-16-|
#
#                       |---------------------160----------------------|

frame_df <-
  expand.grid(x = 1:160, y = 1:144) |>
  dplyr::filter(!(x >= 17 & x <= 144 & y >= 17 & y <= 128))

# Create R data object
usethis::use_data(frame_df, overwrite = TRUE)
cj-holmes/ggboy documentation built on Sept. 17, 2024, 8:09 a.m.