Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dygraph's %>% replacing Dplyr's

Tags:

r

dplyr

dygraphs

I'm writing a package that imports shiny, dygraphs and shiny. However, whenever I'm Build & Load the package, there's always a warning, replacing previous imports by 'dygraphs::%>%' when loading mypkg.

I've tried change the order in DESCRIPTION, but it doesn't work. Also, the package uses a lot of dplyr functions as well as dygraphs', so I can't just say importFrom, otherwise it will be a long list. Therefore, is there any way to not import dygraphs::%>% or dplyr::%>% into my package? Or is there any other way to solve this warning? Thanks!

like image 764
Miller Zhu Avatar asked Jul 17 '15 12:07

Miller Zhu


1 Answers

I don't think there is a way to "not import" something from a package. You can check the user manual for Roxygen2, and in the "import" section there is no such command. You might still want to use importFrom for dplyr. You just need to import the following functions:

select filter mutate arrange group_by ungroup summarise left_join tbl_df

I think these are all the functions you need to import, but you can add more when you see errors. It should not take more than 10 minutes to find out every function you used in the dplyr package.

like image 74
Ziqi Lu Avatar answered Sep 20 '22 03:09

Ziqi Lu