# Example 1: a 16 week observation period with visits every 4 weeks:
# "___o___o___o___o"
collapse_lattice(
lattice_patterns = "___o",
times = 4
)
# Example 2: 24 week observation period with weekly visits for the first
# 12 weeks, then monthly visits (during the second week) thereafter:
# "oooooooooooo_o___o___o__"
collapse_lattice(
lattice_patterns = c("o", "_o__"),
times = c(12, 3)
)
# Example 3: 6 week observation period with clinic visits on set days,
# M-W-F for the first 3 weeks, then Monday only for the next 3 weeks:
# "o_o_o__o_o_o__o_o_o__o______o______o______"
collapse_lattice(
lattice_patterns = c("o_o_o__", "o______"),
times = c(3, 3)
)
Run the code above in your browser using DataLab