Variable$get

Variable$get(wait_for_statistics=FALSE) → self

Fetches the variable, after which variable$properties will contain a named list with entries corresponding to the properties on the variable resource definition. Will raise an error if the variable does not exist.

Parameters:

wait_for_statistics : bool, default FALSE If True, will wait for summary statistics on the variable to be fully populated before returning.

Returns:

self (a Variable)

Examples:

table <- redivis.organization("Demo")$dataset("iris_species")$table("iris")

variable <- table$variable("sepalLengthCm")

variable$exists() # -> TRUE
variable$get(wait_for_statistics=TRUE) 

print(variable$properties)

{
	"kind": "variable",
	... (see variable resource definition)
	"statistics": {
		"status": "completed",
		"count": 150,
		"numDistinct": 35,
		"min": 4.3,
		"max": 7.9,
		"mean": 5.8433333333333355,
		"approxMedian": 0.8280661279778625
	}
}

Last updated