Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ee_subsetting

Extract or replace parts of and ee$ImageCollection


Description

Extract or replace parts of and ee$ImageCollection

Usage

## S3 method for class 'ee.imagecollection.ImageCollection'
x[[index]]

## S3 replacement method for class 'ee.imagecollection.ImageCollection'
x[[index]] <- value

## S3 method for class 'ee.image.Image'
x[[index]]

## S3 replacement method for class 'ee.image.Image'
x[[index]] <- value

Arguments

x

ee$ImageCollection or ee$Image.

index

Integer. Index specifying elements to extract or replace.

value

ee$ImageCollection or ee$Image to replace in.

Examples

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

ee_Initialize(gcs = TRUE, drive = TRUE)

# Define a Image or ImageCollection: Terraclimate
terraclimate <- ee$ImageCollection("IDAHO_EPSCOR/TERRACLIMATE") %>%
  ee$ImageCollection$filterDate("2001-01-01", "2002-01-01")

# Define temperature Vis parameters
maximumTemperatureVis <- list(
  min = -300.0,
  max = 300.0,
  palette = c(
    '1a3678', '2955bc', '5699ff', '8dbae9', 'acd1ff', 'caebff', 'e5f9ff',
    'fdffb4', 'ffe6a2', 'ffc969', 'ffa12d', 'ff7c1f', 'ca531a', 'ff0000',
    'ab0000'
  )
)

Map$setCenter(71.72, 52.48, 2)
m1 <- Map$addLayer(terraclimate[[2]][["tmmx"]], maximumTemperatureVis)

terraclimate[[2]] <- terraclimate[[2]]*1.4
m2 <- Map$addLayer(terraclimate[[2]][["tmmx"]], maximumTemperatureVis)
m1 | m2

## End(Not run)

rgee

R Bindings for Calling the 'Earth Engine' API

v1.0.9
Apache License (>= 2.0)
Authors
Cesar Aybar [aut, cre] (<https://orcid.org/0000-0003-2745-9535>), Wu Qiusheng [ctb] (<https://orcid.org/0000-0001-5437-4073>), Lesly Bautista [ctb] (<https://orcid.org/0000-0003-3523-8687>), Roy Yali [ctb] (<https://orcid.org/0000-0003-4542-3755>), Antony Barja [ctb] (<https://orcid.org/0000-0001-5921-2858>), Kevin Ushey [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Tim Appelhans [ctb], JJ Allaire [ctb], Yuan Tang [ctb], Samapriya Roy [ctb], MariaElena Adauto [ctb] (<https://orcid.org/0000-0002-2154-2429>), Gabriel Carrasco [ctb] (<https://orcid.org/0000-0002-6945-0419>), Henrik Bengtsson [ctb], Jeffrey Hollister [rev] (Hollister reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/), Gennadii Donchyts [rev] (Gena reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/), Marius Appel [rev] (Appel reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.