SetGeoAssignment: Associates the object with a 'GeoAssignment' object.

Description Usage Arguments Details Value

Description

Associates the object with a GeoAssignment object.

Associates the object with a GeoAssignment object, mapping geos into geo group numbers.

Usage

1
2
3
4
SetGeoAssignment(obj, ...) <- value

## S3 replacement method for class 'GeoExperimentData'
SetGeoAssignment(obj, strict = TRUE, ...) <- value

Arguments

obj

the object to change.

...

further arguments passed to methods.

value

a GeoAssignment object.

strict

(flag) insist that all geos in the data are mapped? Also, warn if some geos are not found in the data?

Details

If value is NULL, the geo assignment and the treatment assignment are removed, and their corresponding columns in the data frame are reset to 'NA'. An error is thrown if any geo in data cannot be mapped to a group (due to the GeoAssignment object not having such a mapping). Setting 'strict' to FALSE will avert this. An error is thrown if some of the geos in the mapping were not present in the data. Setting 'strict' to FALSE will avert this.

geo.assignment slot is assigned with the new value and the columns geo.group and assignment are changed to reflect the new geo assignment.

Value

The object (that has been modified in place).


google/GeoexperimentsResearch documentation built on May 17, 2019, 7:42 a.m.