Learn R Programming

ganalytics (version 0.10.7)

GaExpr: GaExpr

Description

Create a Core Reporting API expression.

Usage

GaExpr(object, comparator, operand, metricScope = "")

# S4 method for character,character GaExpr(object, comparator, operand, metricScope = "")

Arguments

object

A dimension or metric variable, or another object to be coerced to an .expr object.

comparator

The comparator to use for the expression.

operand

The operand to use for the expression.

metricScope

Optional scope to use in the case of metric variables for segmentation. Possible values include "perUser" or "perSession".

Methods (by class)

  • object = character,comparator = character: Return a Google Analytics expression using the supplied variable, operator and operand. bounces <- GaExpr("bounces", ">", 0)

See Also

Other expression generators: Expr, McfExpr, RtExpr

Examples

Run this code
# NOT RUN {
myQuery <- GaQuery(view = 123456789)
source_matches_google <- GaExpr("source", "~", "google")
TableFilter(myQuery) <- source_matches_google

# }

Run the code above in your browser using DataLab