[英]Missing function "split" in the R package stars
在嘗試使用split
function 拆分stars
光柵 object 時,我遇到了 package stars
的問題。 我使用stars
版本 0.5-4(在要求安裝stars
時會自動安裝該版本)。 According to the package documentation, there should be a function split
(in fact, it's probably a method for the generic R function split
) for splitting stars
object. 但是,當我嘗試使用它時,我的 R 說在stars
命名空間中沒有這樣的 function。 function 真的不見了而且文檔有誤嗎? 或者這可能是由命名空間的其他問題引起的?
> library(stars)
> split.stars
Error: object 'split.stars' not found
> stars::split
Error: 'split' is not an exported object from 'namespace:stars'
但是當我輸入
> ?stars
我從stars
獲得了split
function 的幫助。 有人可以解釋一下嗎?
提前致謝!
編輯:現在可以了,不知道是什么問題。
split
是一個基礎 R function。 它是一個S3 generic ,並且'stars' package 為自定義 S3 class 提供了自己的方法實現。
要使用該方法,請將其用作基礎 R 的任何其他常規 function。 也就是說,寫split
。 不要寫split.stars
,也不要寫stars::split
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.