length.ee.image.Image: Length of an Earth Engine Image Object

length.ee.image.ImageR Documentation

Length of an Earth Engine Image Object

Description

Get or set the length of an Earth Engine Image.

Usage

## S3 method for class 'ee.image.Image'
length(x)

Arguments

x

an EE Image Object.

Details

If a vector is shortened, extra values are discarded and when a vector is lengthened, it is padded out to its new length with ee$Image(0), with band name of zzz_rgee_NA_%02d.

Value

A numeric value that indicate the number of bands in a ee$Image.

Examples

## Not run: 
library(rgeeExtra)
library(rgee)

ee_Initialize()     # Initialize the Google Earth Engine API connection
extra_Initialize()  # Initialize the extended functionalities of rgeeExtra

ic <- ee$Image("COPERNICUS/S2_SR/20190310T105851_20190310T110327_T30TVK")
length(ic)

## End(Not run)

r-earthengine/rgeeExtra documentation built on Dec. 7, 2023, 9:03 p.m.