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

Ops-methods

Earth Engine arithmetic, logic and compare generic functions


Description

Arithmetic, logic and compare operators for computation with ee$Image objects and numeric values.

Usage

## S3 method for class 'ee.image.Image'
Ops(e1, e2)

Arguments

e1

Numeric or ee$Image.

e2

Numeric or ee$Image.

Details

  • Arith: +, -, *, /, ^, %%, %/%, %>>% and %>>%.

  • Logic: !, &, |.

  • Comparison: ==, !=, >, <, <=, >=

Examples

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

# Sum Operator
ee1 <- ee$Image(1)
ee2 <- ee$Image(2)
ee3 <- ee1 + ee2
ee_extract(ee3, ee$Geometry$Point(0, 0))

v1 <- 1
v2 <- 2
v3 <- v1 + v2
v3

# Multiple Operators
ee4 <- ee1 / 10
ee5 <- ee4 * (ee2 - 1 + ee1^2 / ee2)
ee_extract(ee5, ee$Geometry$Point(0, 0))

v4 <- v1 / 10
v5 <- v4 * (v2 - 1 + v1^2 / v2)
v5

# multi-layer object mutiplication, no recycling
ee6 <- ee1 + c(1, 5, 10)
ee_extract(ee6, ee$Geometry$Point(0, 0))

v6 <- v1 + c(1, 5, 10)
v6

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