[R-pkg-devel] Explicitly Calling a Method of a specific Class in a Function

Georgi Boshnakov georgi@bo@hn@kov @ending from m@nche@ter@@c@uk
Mon May 7 14:38:47 CEST 2018


>checking dependencies in R code ... NOTE Unexported object imported by  ‘sp:::plot.SpatialPolygons’ ...

The above message already shows that plot.SpatialPolygons is not exported. 
But are you sure that you really wish to call the method and not simply call plot() and let it choose the appropriate method?

You need to import 'sp' or something from it, in order to make the plot method for 'SpatialPolygons' available.
You can do this by putting  import(sp) in NAMESPACE or importFrom(sp, something), where 'something' is some object exported by 'sp'. 

Georgi Boshnakov




-----Original Message-----
From: R-package-devel [mailto:r-package-devel-bounces at r-project.org] On Behalf Of Dr. rer. nat. Michael Thrun
Sent: 06 May 2018 10:43
To: r-package-devel at r-project.org
Subject: [R-pkg-devel] Explicitly Calling a Method of a specific Class in a Function

Dear Developers,
I have currently one note in one of my packages I am unable to solve at my own:
“
checking dependencies in R code ... NOTE
Unexported object imported by a ':::' call: ‘sp:::plot.SpatialPolygons’
  See the note in ?`:::` about the use of this operator.
“
The goal is to explicitly call the plot function of the 'SpatialPolygons-class' in the function ‘plotWorldmap'.
In The CRAN checks the examples work. Manual calling 
of the function ‘plotWorldmap' also works in an clean environment yielding the expected plot.
Thus, I assume the call
 sp:::plot.SpatialPolygons(world_country_polygons,col =cols,…)
is in principle correct. 

Could someone please help me?
What do I have to do or to change in order to disable this note?

Best Regards
M. Thrun
______________________________________________
R-package-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


More information about the R-package-devel mailing list