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

Roger Bivand Roger@Biv@nd @ending from nhh@no
Wed May 9 12:36:23 CEST 2018


(apologies for out-of-thread response)

Both plot() and SpatialPolygons are S4, so see:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Namespaces-with-S4-classes-and-methods

for guidance, probably

importClassesFrom(sp, SpatialPolygons)
importMethodsFrom(sp, plot)

(untried), and list sp in Imports in DESCRIPTION.

Roger

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-package-devel mailing list