crunch (version 1.27.7)

crunch-extract: Extract and modify Crunch objects

Description

Extract and modify Crunch objects

This function is no-op because the items are already updated on the server with other methods called prior to it.

Usage

# S4 method for AbstractCategories,ANY,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for AbstractCategories,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for AbstractCategories,numeric,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for AbstractCategories,character,ANY,ANY [(x, i, j, ...) <- value

# S4 method for AbstractCategories,character [[(x, i, j, ...)

# S4 method for AbstractCategories,character,ANY,ANY [[(x, i, j, ...) <- value

# S4 method for AbstractCategory $(x, name)

# S4 method for AbstractCategory $(x, name) <- value

# S4 method for ScriptCatalog,numeric [[(x, i, j, ...)

# S4 method for Categories,ANY,ANY,ANY [(x, i, j, ...) <- value

# S3 method for CrunchDataFrame [(x, i, j, drop = TRUE)

# S3 method for CrunchDataFrame [(x, i, j) <- value

# S3 method for CrunchDataFrame [[(x, i)

# S3 method for CrunchDataFrame [[(x, i) <- value

# S3 method for CrunchDataFrame $(x, i)

# S3 method for CrunchDataFrame $(x, i) <- value

# S4 method for CubeDims,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchCube,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for TransformsList,ANY,missing,`NULL` [[(x, i, j) <- value

# S4 method for DatasetCatalog,numeric [[(x, i, j, ...)

# S4 method for DatasetCatalog,character,missing,DatasetTuple [[(x, i, j) <- value

# S4 method for CrunchDataset,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchDataset,logical,missing [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchDataset,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchDataset,VariableGroup,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchDataset,VariableOrder,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchDataset,missing,ANY [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchDataset,CrunchLogicalExpr,missing [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchDataset,CrunchLogicalExpr,ANY [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchDataset subset(x, ...)

# S4 method for CrunchDataset,ANY [[(x, i, ..., drop = FALSE)

# S4 method for CrunchDataset,character [[(x, i, ..., drop = FALSE)

# S4 method for CrunchDataset $(x, name)

# S4 method for CrunchDataset,character,missing,CrunchVariable [[(x, i) <- value

# S4 method for CrunchDataset,ANY,missing,CrunchVariable [[(x, i) <- value

# S4 method for CrunchDataset,character,missing,ANY [[(x, i) <- value

# S4 method for CrunchDataset,ANY,ANY,ANY [[(x, i) <- value

# S4 method for CrunchDataset,character,missing,`NULL` [[(x, i) <- value

# S4 method for CrunchDataset,ANY,missing,`NULL` [[(x, i) <- value

# S4 method for CrunchDataset $(x, name) <- value

# S4 method for CrunchDataset,character,missing,CrunchGeography [[(x, i) <- value

# S4 method for CrunchDataset,ANY,missing,CrunchGeography [[(x, i) <- value

# S4 method for CrunchDataset,ANY,missing,list [(x, i, j) <- value

# S4 method for CrunchDataset,ANY,missing,CrunchDataset [(x, i, j) <- value

# S4 method for CrunchDataset,CrunchExpr,ANY,ANY [(x, i, j) <- value

# S4 method for ShojiCatalog,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiCatalog,numeric,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiCatalog,logical,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiCatalog,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiCatalog,ANY [[(x, i, j, ...)

# S4 method for ShojiCatalog,character [[(x, i, j, ...)

# S4 method for ShojiCatalog $(x, name)

# S4 method for ShojiCatalog $(x, name) <- value

# S4 method for ShojiCatalog,ANY,missing,ShojiCatalog [(x, i, j) <- value

# S4 method for DeckCatalog,ANY [[(x, i, j, ...)

# S4 method for DeckCatalog,character [[(x, i, j, ...)

# S4 method for DeckCatalog,ANY,missing,CrunchDeck [[(x, i, j) <- value

# S4 method for CrunchDeck,ANY,missing,AnalysisCatalog [[(x, i, j) <- value

# S4 method for SlideCatalog,ANY,missing,CrunchSlide [[(x, i, j) <- value

# S4 method for AnalysisCatalog,ANY,missing,Analysis [[(x, i, j) <- value

# S4 method for CrunchDeck,ANY [[(x, i, j, ...)

# S4 method for CrunchDeck,ANY,ANY,ANY [[(x, i, j) <- value

# S4 method for CrunchExpr,CrunchLogicalExpr,ANY [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchExpr,logical,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchExpr,numeric,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for FilterCatalog,numeric [[(x, i, j, ...)

# S4 method for FilterCatalog,character,missing,CrunchLogicalExpr [[(x, i, j) <- value

# S4 method for FilterCatalog,numeric,missing,CrunchLogicalExpr [[(x, i, j) <- value

# S4 method for FilterCatalog,character,missing,CrunchFilter [[(x, i, j) <- value

# S4 method for FilterCatalog,numeric,missing,CrunchFilter [[(x, i, j) <- value

# S4 method for MemberCatalog,character [[(x, i, j, ...)

# S4 method for MemberCatalog,ANY,missing,ANY [[(x, i, j) <- value

# S4 method for MemberCatalog,character,missing,`NULL` [[(x, i, j) <- value

# S4 method for MultitableCatalog,numeric [[(x, i, j, ...)

# S4 method for MultitableCatalog,character,missing,formula [[(x, i, j) <- value

# S4 method for MultitableCatalog,numeric,missing,formula [[(x, i, j) <- value

# S4 method for MultitableCatalog,ANY,missing,Multitable [[(x, i, j) <- value

# S4 method for MultitableCatalog,ANY,missing,`NULL` [[(x, i, j) <- value

# S4 method for PermissionCatalog,character [[(x, i, j, ...)

# S4 method for ProjectFolder,character,missing,list [[(x, i, j) <- value

# S4 method for ProjectFolder,character,missing,ProjectFolder [[(x, i, j) <- value

# S4 method for ShojiFolder,numeric [[(x, i, ..., drop = FALSE)

# S4 method for ShojiFolder,character [[(x, i, ..., drop = FALSE)

# S4 method for ShojiOrder,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiOrder,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ShojiOrder,ANY [[(x, i, j, ...)

# S4 method for ShojiOrder,character [[(x, i, j, ...)

# S4 method for ShojiOrder $(x, name)

# S4 method for ShojiOrder,character,missing,ShojiOrder [(x, i, j) <- value

# S4 method for ShojiOrder,ANY,missing,ShojiOrder [(x, i, j) <- value

# S4 method for ShojiOrder,character,missing,list [[(x, i, j) <- value

# S4 method for ShojiOrder,character,missing,character [[(x, i, j) <- value

# S4 method for ShojiOrder,character,missing,OrderGroup [[(x, i, j) <- value

# S4 method for ShojiOrder,ANY,missing,OrderGroup [[(x, i, j) <- value

# S4 method for ShojiOrder,ANY,missing,ANY [[(x, i, j) <- value

# S4 method for ShojiOrder,ANY,missing,`NULL` [[(x, i, j) <- value

# S4 method for ShojiOrder,character,missing,`NULL` [[(x, i, j) <- value

# S4 method for ShojiOrder,character,missing,ShojiOrder [[(x, i, j) <- value

# S4 method for ShojiOrder $(x, name) <- value

# S4 method for OrderGroup,ANY,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for OrderGroup,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for OrderGroup,character [[(x, i, j, ...)

# S4 method for OrderGroup,ANY [[(x, i, j, ...)

# S4 method for OrderGroup $(x, name)

# S4 method for OrderGroup,character,missing,list [[(x, i, j) <- value

# S4 method for OrderGroup,character,missing,character [[(x, i, j) <- value

# S4 method for OrderGroup,character,missing,ShojiOrder [[(x, i, j) <- value

# S4 method for OrderGroup,character,missing,OrderGroup [[(x, i, j) <- value

# S4 method for OrderGroup,ANY,missing,OrderGroup [[(x, i, j) <- value

# S4 method for OrderGroup,numeric,missing,`NULL` [[(x, i, j) <- value

# S4 method for OrderGroup,character,missing,`NULL` [[(x, i, j) <- value

# S4 method for OrderGroup $(x, name) <- value

# S4 method for SlideCatalog,ANY [[(x, i, j, ...)

# S4 method for SlideCatalog,numeric,missing,CrunchSlide [[(x, i, j) <- value

# S4 method for CrunchSlide,ANY [[(x, i, j, ...)

# S4 method for CrunchSlide,ANY,ANY,ANY [[(x, i, j) <- value

# S4 method for AnalysisCatalog,ANY [[(x, i, j, ...)

# S4 method for AnalysisCatalog,numeric,missing,formula [[(x, i, j) <- value

# S4 method for AnalysisCatalog,numeric,missing,Analysis [[(x, i, j) <- value

# S4 method for AnalysisCatalog,numeric,missing,list [[(x, i, j) <- value

# S4 method for Subvariables,character [[(x, i, j, ...)

# S4 method for Subvariables,numeric [[(x, i, j, ...)

# S4 method for Subvariables,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for Subvariables,character,missing,CrunchVariable [[(x, i) <- value

# S4 method for Subvariables,ANY,missing,CrunchVariable [[(x, i) <- value

# S4 method for Subvariables,ANY,missing,`NULL` [[(x, i) <- value

# S4 method for Subvariables,ANY,missing,ANY [[(x, i) <- value

# S4 method for Subvariables,character,missing,Subvariables [(x, i) <- value

# S4 method for Subvariables,ANY,missing,Subvariables [(x, i) <- value

# S4 method for Subvariables,ANY,missing,ANY [(x, i) <- value

# S4 method for ArrayVariable,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ArrayVariable,missing,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for ArrayVariable,missing,character [(x, i, j, ..., drop = TRUE)

# S4 method for ArrayVariable,ANY [[(x, i, j, ...)

# S4 method for ArrayVariable,character [[(x, i, j, ...)

# S4 method for ArrayVariable $(x, name)

# S4 method for ArrayVariable,ANY,missing,ANY [[(x, i) <- value

# S4 method for ArrayVariable,character,missing,ANY [[(x, i) <- value

# S4 method for ArrayVariable $(x, name) <- value

# S4 method for TabBookResult,numeric [[(x, i, j, ...)

# S4 method for TabBookResult,character [[(x, i, j, ...)

# S4 method for MultitableResult,ANY [[(x, i, j, ...)

# S4 method for TeamCatalog,numeric [[(x, i, j, ...)

# S4 method for TeamCatalog,character,missing,list [[(x, i, j) <- value

# S4 method for TeamCatalog,character,missing,CrunchTeam [[(x, i, j) <- value

# S4 method for UserCatalog,character,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for UserCatalog,character [[(x, i, j, ...)

# S4 method for VariableCatalog,numeric [[(x, i, j, ...)

# S4 method for VariableCatalog,character,missing,VariableTuple [[(x, i, j) <- value

# S4 method for VariableCatalog,character,missing,CrunchVariable [[(x, i, j) <- value

# S4 method for VariableCatalog,VariableOrder,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for VariableCatalog,VariableGroup,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for VariableCatalog,VariableOrder,missing,VariableCatalog [(x, i, j) <- value

# S4 method for VariableCatalog,VariableGroup,missing,VariableCatalog [(x, i, j) <- value

# S4 method for VariableOrder,character,missing,CrunchDataset [[(x, i, j) <- value

# S4 method for VariableGroup,character,missing,CrunchDataset [[(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,ANY [(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,`NULL` [(x, i, j) <- value

# S4 method for TextVariable,ANY,missing,character [(x, i, j) <- value

# S4 method for NumericVariable,ANY,missing,numeric [(x, i, j) <- value

# S4 method for DatetimeVariable,ANY,missing,Date [(x, i, j) <- value

# S4 method for DatetimeVariable,ANY,missing,POSIXt [(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,CrunchExpr [(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,CrunchVariable [(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,CrunchLogicalExpr [(x, i, j) <- value

# S4 method for CategoricalVariable,ANY,missing,numeric [(x, i, j) <- value

# S4 method for CategoricalVariable,ANY,missing,character [(x, i, j) <- value

# S4 method for CategoricalVariable,ANY,missing,factor [(x, i, j) <- value

# S4 method for CategoricalArrayVariable,ANY,missing,numeric [(x, i, j) <- value

# S4 method for CategoricalArrayVariable,ANY,missing,character [(x, i, j) <- value

# S4 method for CategoricalArrayVariable,ANY,missing,factor [(x, i, j) <- value

# S4 method for CrunchVariable,ANY,missing,logical [(x, i, j) <- value

# S4 method for CrunchVariable,ANY is.na(x) <- value

# S4 method for CrunchVariable,CrunchExpr,ANY [(x, i, j, ..., drop = FALSE)

# S4 method for CrunchVariable,numeric,ANY [(x, i, j, ..., drop = TRUE)

# S4 method for CrunchVariable,logical,ANY [(x, i, j, ..., drop = TRUE)

Arguments

x

a Crunch object (Dataset, Variable, CrunchExpr, Catalog, CrunchCube, etc.)

i

The elements to extract; as with R, this can generally be (1) a logical vector of length matching x; (2) a character vector of appropriate length, which can generally be URLs or also names, aliases, or other identifier; (3) integer indices, potentially negative, to select. Datasets and Variables can also be subset by CrunchExpr. Note that when subsetting Datasets and variables by R vectors, the input i is turned into a CrunchExpr so that it can be used in API queries.

j

For two-dimensional objects, elements to take from the columnar dimension. Note that Datasets work like data.frames in that you can extract columns either by ds[, j] or by the list-like ds[i] (with no comma).

...

additional arguments supported by some methods. For example, some catalogs support a secondary vector of elements to match against like emails(x) or owners(x); by default this is names(x). This lets (for example) you to look up variables by URL but fall back to name.

drop

Ignored and always assumed FALSE

value

For updating, an object of the appropriate class and size to insert. This is generally the same class of object you would get from the extract method; i.e. for x[[i]] <- value, value must be the same class as x[[i]]. Exceptions include ds$var <- VariableDefinition(...) to create a new variable, and ds$var[i] <- value, which can take R vectors and CrunchExpr.

name

for $, the same as i for [[

Value

[ generally returns a subset of x, same class and "self" URL; when subsetting with a CrunchExpr, the expression is recorded in an attribute of the object. [[ and $ return appropriate extractions from x, wherever possible without making an additional API request. The assignment methods return x appropriately updated. Most assignment methods do not make an API request except where they clearly are used to create a new entity (as in assigning a variable definition to a Dataset); for editing metadata attributes, these methods generally assume that the API request to set the changes on the server happens in a different method (e.g. in names(variables(ds)[1:5]) <- value, assignment happens in the names<- method).