I changed the name of my github package by removing an illegal underscore and it's caused everything to break. I've subsequently removed all except the 5 core scripts from /R/ but still can't get it to install.
The current problem is, when I document()
I get
Error in filter(check1, relocations >= bbdwindowsize): object 'relocations' not found
From here:
check1 <- data %>%
group_by(ID) %>%
summarise(relocations = length(Datetime))
check2 <- filter(check1, relocations >= bbdwindowsize)
There's nothing wrong with this code. Does document()
not understand dplyr
coding style?
Thanks
Edit: Thanks for the quick replies folks. Per MrFlick's suggestion:
# at top
#' @importFrom rlang .data
# then:
check1 <- data %>%
group_by(.data$ID) %>%
summarise(relocations = length(.data$Datetime))
check2 <- filter(check1, .data$relocations >= bbdwindowsize)
Error in (check2 line): Can't subset
.data
outside of a data mask context.
Any ideas? Thanks again.