Hey guys,
I'm creating a package for my function, however, when I build and 'check', it gives me an error
saying:
> checking examples ... ERROR
Running examples in ‘TrumpWordFreq-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Word_freq_trump
> ### Title: Showing the change of Word Frequency Over Time
> ### Aliases: Word_freq_trump
>
> ### ** Examples
>
>
> Word_freq_trump(Trump_DataSet, "america")
Error in dataset %>% unnest_tokens(word, Speech, to_lower = T) %>% count(Date, :
could not find function "%>%"
Calls: Word_freq_trump
Execution halted
I've imported dplyr and also tried importing magrittr where the pipe function comes from and scoped the function ''magrittr::%>%''. But that doesn't seem to work.
Any ideas what my error could be?