我试图查看中的writeRaster函数 光栅 包裹:
> library("raster")
> writeRaster
standardGeneric for "writeRaster" defined from package "raster"
function (x, filename, ...)
standardGeneric("writeRaster")
showMethods没有显示我可以在getMethod中使用的对象名称:
> showMethods("writeRaster")
Function: writeRaster (package raster)
x="RasterLayer", filename="character"
x="RasterStackBrick", filename="character"
我从那里去哪里抓住明显的
> getMethod("writeRaster","RasterLayer")
*修改 正如@Metrics所建议的那样:
> getAnywhere("writeRaster")
A single object matching ‘writeRaster’ was found
It was found in the following places
package:raster
namespace:raster
with value
function (x, filename, ...)
standardGeneric("writeRaster")
<bytecode: 0x5a78b18>
<environment: 0x5acadd8>
attr(,"generic")
[1] "writeRaster"
attr(,"generic")attr(,"package")
[1] "raster"
attr(,"package")
[1] "raster"
attr(,"group")
list()
attr(,"valueClass")
character(0)
attr(,"signature")
[1] "x" "filename"
attr(,"default")
`\001NULL\001`
attr(,"skeleton")
(function (x, filename, ...)
stop("invalid call in method dispatch to 'writeRaster' (no default method)",
domain = NA))(x, filename, ...)
attr(,"class")
[1] "standardGeneric"
attr(,"class")attr(,"package")
[1] "methods"