我正在尝试使用rgee包在Google Earth引擎中运行以下代码:
# Load rgee
library(rgee)
# Initialise
ee_users()
ee_Initialize()
# The incorrect use of repeat within an rgee context
ee$List$repeat(1,3)但是我得到了一个错误:
Error: unexpected 'repeat' in "ee$List$repeat"是不是因为在基数r中与repeat有一些混淆?
发布于 2020-12-01 00:01:27
对于R保留字,使用反引号/引号:
# Load rgee
library(rgee)
# Initialise
ee_users()
ee_Initialize()
# The incorrect use of repeat within an rgee context
ee$List$'repeat'(1,3)$map(
ee_utils_pyfunc( #ee_utils_pyfunc is necessary to apply a map function to an ee$List
function(x) {
ee$Number(x)$add(1)
}
)
)https://stackoverflow.com/questions/65027506
复制相似问题