Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow vector input for map.event.coords.to.plot #197

Open
Masswear opened this issue Nov 15, 2022 · 0 comments
Open

allow vector input for map.event.coords.to.plot #197

Masswear opened this issue Nov 15, 2022 · 0 comments

Comments

@Masswear
Copy link
Collaborator

map.event.coords.to.plot accepts only a single value for x (and presumably y). It would be useful to supply x as a vector of event dates, e.g. to annotate multiple events at once.

Reproducible example:

cma7 <- CMA7(data=med.events[med.events$PATIENT_ID %in% c(1,2),],
             ID.colname="PATIENT_ID",
             event.date.colname="DATE",
             event.duration.colname="DURATION",
             event.daily.dose.colname="PERDAY",
             medication.class.colname="CATEGORY",
             followup.window.start=0,
             followup.window.start.unit="days",
             followup.window.duration=2*365,
             followup.window.duration.unit="days",
             observation.window.start=30,
             observation.window.start.unit="days",
             observation.window.duration=365,
             observation.window.duration.unit="days",
             date.format="%m/%d/%Y",
             summary="Base CMA");

map.event.coords.to.plot(x = cma7$event.info$.DATE.as.Date) #returns error: Error in if (is.na(x)) { : the condition has length > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant