Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ggvis use of " := " in combination with data.table

When starting up ggvis I get the message :

The following object is masked from ‘package:data.table’:

:=

That := is essential for running data.table, which happens to be the alternative for dplyr.

My code still runs correctly, but the startup message worries me, since I use data.table in all my scripts.

What are the consequences of using := in both data.table and ggvis, given the startup message of ggvis?

like image 859
Henk Avatar asked Mar 19 '23 01:03

Henk


1 Answers

Both ggvis and data.table have that function defined to prevent that operator from being used outside of the correct syntax (within correct syntax the packages don't let R handle the parsing and that function doesn't get called). You can check what exactly each one does by typing ggvis::":=" and data.table::":=" (they both just call stop unconditionally).

So the only consequence is going to be a somewhat weird error message if you screw up the syntax (e.g. getting the data.table error message in ggvis or vice versa, depending on which package you load first).

like image 96
eddi Avatar answered Apr 02 '23 18:04

eddi