mskilab-org / gTrack

R package for visualizing complex and multi-track 1D and 2D genomic data in GenomicRanges framework
16 stars 12 forks source link

plot Not detecting gTrack #6

Closed walaj closed 8 years ago

walaj commented 8 years ago

Anyone know the right way to do this? It looks like the method is being exported in the NAMESPACE file, and it shows up as accepting a gTrack with a showMethods('plot') call, but its not detecting gTrack when I build gTrack as a package rather than source (If I source gTrack.R directly, plot(g) works). If I attach as package, it errors with this when trying to call base::plot:

Error in as.double(y) : cannot coerce type 'S4' to vector of type 'double'

Any thoughts?

imielinski commented 8 years ago

This is an issue I've wrestled with before - it's a result of overloading S3 methods in an S4 object. Plot is an S3 method, and essentially R is not recognizing the gTrack version.

Ive been able to get rid of it before, but just through trial and error, and not my figuring out what was going on.

Might be NAMESPACE problem

mskilab commented 8 years ago

have we figured this out yet?

walaj commented 8 years ago

Yeah, it seems to work now. I really don't understand this still... I think adding this helped??

' @aliases plot,gTrack,ANY-method