rbertolusso / intubate

<||> Interfaces to Popular R Functions for Data Science Pipelines, and More
GNU General Public License v2.0
75 stars 5 forks source link

lattice functions not working #9

Closed timelyportfolio closed 8 years ago

timelyportfolio commented 8 years ago

Loving this, but bummed I ran into trouble with the lattice functions.

data.frame(x=1:10) %>% xyplot(x~x)

gives me

Error in UseMethod("xyplot") : 
  no applicable method for 'xyplot' applied to an object of class "data.frame"
library(lattice)
library(intubate)
Depth <- equal.count(quakes$depth, number=8, overlap=.1)
Depth %>% xyplot(lat ~ long | Depth)

gives me

Error in UseMethod("xyplot") : 
  no applicable method for 'xyplot' applied to an object of class "shingle"

I get a similar error with all the ntbt_* lattice functions that I tried. Is this a problem with generics?

rbertolusso commented 8 years ago

Has to be

data.frame(x=1:10) %>% ntbt_xyplot(x~x)

not

data.frame(x=1:10) %>% xyplot(x~x)
timelyportfolio commented 8 years ago

How dumb of me! I will blame it on my excitement. I knew that. Sorry.

rbertolusso commented 8 years ago

(this is part of my evil plan... you will dream with ntbt_...)

timelyportfolio commented 8 years ago

Maybe it should be o__

rbertolusso commented 8 years ago

Please also create interfaces to any function not included. You need to do

ntbt_your_function <- intubate