Var: Var

Description Usage Arguments Details Value Methods (by class) See Also Examples

Description

Google Analytics dimension and metric variables.

Var<- sets the value of an object belonging to the superclass .var or sets the var slot of an expression object belonging to superclass .expr

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Var(object, ...)

Var(object) <- value

GaVar(object, ...)

GaVar(object) <- value

McfVar(object, ...)

McfVar(object) <- value

RtVar(object, ...)

RtVar(object) <- value

## S4 method for signature 'character'
Var(object)

## S4 replacement method for signature '.var,character'
Var(object) <- value

## S4 method for signature '.expr'
Var(object)

## S4 replacement method for signature '.expr,character'
Var(object) <- value

## S4 method for signature '.gaVarList'
Var(object)

## S4 method for signature 'character'
GaVar(object)

## S4 replacement method for signature '.gaVar,character'
GaVar(object) <- value

## S4 method for signature '.expr'
GaVar(object)

## S4 replacement method for signature '.expr,character'
GaVar(object) <- value

## S4 method for signature '.gaVarList'
GaVar(object)

## S4 method for signature 'ANY'
McfVar(object)

## S4 method for signature 'ANY'
RtVar(object)

Arguments

object

An object that inherits from or extends the class .var, including gaDimVar, gaMetVar, mcfDimVar, mcfMetVar, rtDimVar, rtMetVar, gaExpr, mcfExpr, rtExpr, gaDimensions, gaMetrics, mcfDimensions, mcfMetrics, rtDimensions and rtMetrics.

...

A replacement value for object coerced to class .var.

value

any object that can be coerced to a valid object class.

Details

Var returns a .var object which is valid Google Analytics dimension or metric for use with the core reporting, multi-channel-funnel reporting or real-time reporting API.

Use Var to lookup a dimension or metric from the Google Analytics core reporting, multi-channel-funnel reporting, or real-time reporting APIs, for use in defining expressions (of superclass .expr) or (to be implemented) variable lists (of superclass .varList) such as query dimensions, metrics or sortBy parameters.

Var accepts either a character, .var, or .expr object. A character object will be coerced to a .var object by looking for a matching dimension or metric from the Core Reporting, Multi-Channel Funnel Reporting, and Real-Time Reporting APIs. Providing an .expr object will return the dimension or metric used within that Google Analytics expression.

Value

An object inheriting from the superclass .var

Methods (by class)

See Also

Examples

1
2
3
4
5
6
7
8
Var("source")
dim <- Var("ga:medium")
Var(dim)
paid_traffic <- Expr(dim, "==", "cpc")
Var(paid_traffic)

expr1 <- Expr("pageviews", '>', 10)
Var(expr1) <- "uniquePageviews"

ganalytics documentation built on May 2, 2019, 8:34 a.m.