Skip to content

time offset and ld annotations fails on polar coordinates when time offset is not 0 #35

@qgeissmann

Description

@qgeissmann
library(behavr)
# We start by making a to dataset with 20 animals
metadata <- data.frame(id = sprintf("toy_experiment | %02d", 1:20),
                       condition = c("A", "B"))
dt <- toy_activity_data(metadata, 3)
# We build a plot object
pl <-  ggetho(dt, aes(y = asleep), time_offset = 1000, time_wrap = behavr::hours(24)) + stat_pop_etho() +coord_polar() +
stat_ld_annotations(height=.5,
                    alpha=.3,
                    ypos=0.015,
                    x_limits = c(0, 86400),
                    outline = NA, ld_colours = c('blue', 'red'))
pl
Warning messages:
1: In munched_lines$id + rep(c(0, max(ids, na.rm = TRUE)), each = length(ids)) :
  longer object length is not a multiple of shorter object length
2: Removed 1 rows containing missing values (geom_ld). 

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions