ee$List$repeat 的问题

Problems with ee$List$repeat

我正在尝试使用 rgee 包让以下代码在 Google Earth Engine 中工作:

# 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"

是不是和repeat in base r有些混淆?

对于 R 保留字使用 backticks/quotation 标记:

    # 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)
          }
        )    
    )