Get and set slide analyses
Slides are composed of analyses, which are effectively CrunchCubes with some
additional metadata. You can get and set a slide's Analysis Catalog with the
analyses method, and access an individual analysis with analysis. There
are also helpers to get and set the components of the analysis such as filter(),
weight(), transforms(), displaySettings() and vizSpecs(). You can also
get the CrunchCube from an analysis using cube().
filter(x, ...) filter(x) <- value ## S4 replacement method for signature 'CrunchDeck,ANY' weight(x) <- value ## S4 replacement method for signature 'CrunchDeck,ANY' filter(x) <- value ## S4 method for signature 'CrunchSlide' transforms(x) ## S4 method for signature 'AnalysisCatalog' transforms(x) ## S4 method for signature 'Analysis' transforms(x) ## S4 replacement method for signature 'CrunchSlide,ANY' transforms(x) <- value ## S4 replacement method for signature 'AnalysisCatalog,ANY' transforms(x) <- value ## S4 replacement method for signature 'Analysis,ANY' transforms(x) <- value analyses(x) analysis(x) analysis(x) <- value query(x) <- value cube(x) cubes(x) displaySettings(x) displaySettings(x) <- value vizSpecs(x) vizSpecs(x) <- value ## S4 method for signature 'CrunchSlide' analyses(x) ## S4 method for signature 'CrunchSlide' analysis(x) ## S4 replacement method for signature 'CrunchSlide,formula' analysis(x) <- value ## S4 replacement method for signature 'CrunchSlide,Analysis' analysis(x) <- value ## S4 replacement method for signature 'CrunchSlide,list' analysis(x) <- value ## S4 method for signature 'CrunchSlide' filter(x, ...) ## S4 replacement method for signature 'CrunchSlide,ANY' filter(x) <- value ## S4 replacement method for signature 'CrunchSlide,ANY' query(x) <- value ## S4 method for signature 'CrunchSlide' cubes(x) ## S4 method for signature 'CrunchSlide' cube(x) ## S4 method for signature 'CrunchSlide' displaySettings(x) ## S4 replacement method for signature 'CrunchSlide,ANY' displaySettings(x) <- value ## S4 method for signature 'CrunchSlide' vizSpecs(x) ## S4 replacement method for signature 'CrunchSlide,ANY' vizSpecs(x) <- value ## S4 method for signature 'AnalysisCatalog' cubes(x) ## S4 method for signature 'AnalysisCatalog' displaySettings(x) ## S4 replacement method for signature 'AnalysisCatalog,list' displaySettings(x) <- value ## S4 method for signature 'AnalysisCatalog' vizSpecs(x) ## S4 replacement method for signature 'AnalysisCatalog,list' vizSpecs(x) <- value ## S4 replacement method for signature 'Analysis,formula' query(x) <- value formulaToSlideQuery(query, dataset) ## S4 method for signature 'Analysis' cube(x) ## S4 method for signature 'Analysis' displaySettings(x) ## S4 replacement method for signature 'Analysis,ANY' displaySettings(x) <- value ## S4 method for signature 'Analysis' vizSpecs(x) ## S4 replacement method for signature 'Analysis,ANY' vizSpecs(x) <- value ## S4 method for signature 'Analysis' filter(x, ...) ## S4 method for signature 'ANY' filter(x, ...) ## S4 replacement method for signature 'CrunchSlide,ANY' filter(x) <- value ## S4 replacement method for signature 'Analysis,CrunchLogicalExpr' filter(x) <- value ## S4 replacement method for signature 'Analysis,CrunchFilter' filter(x) <- value ## S4 replacement method for signature 'Analysis,'NULL'' filter(x) <- value slideQueryEnv(weight, filter) ## S4 method for signature 'CrunchDeck' cubes(x) ## S4 method for signature 'CrunchSlide' weight(x) ## S4 replacement method for signature 'CrunchSlide,ANY' weight(x) <- value ## S4 method for signature 'Analysis' weight(x)
x |
a |
... |
ignored |
value |
for the setter, an object to set it |
query |
For |
dataset |
For |
weight |
For |
filter |
for |
For more complex objects like displaySettings(), vizSpecs() and transforms(),
the API documentation
provides more details.
Advanced users of the API can assign a list to analysis<- to specify settings
on the analyses that are not otherwise available in rcrunch. The helpers
formulaToSlideQuery() and slideQueryEnv() help you create objects for the
query and query_environment.
## Not run: # Examples of setting analysis details (in general these setters work on # the slide, analysis catalog and analysis, but for brevity the examples only # show on the slide) # Change the filter filter(slide) <- NULL # to remove a filter filter(slide) <- filters(ds)[["My filter"]] filter(deck) <- filters(ds)[["My filter"]] # Can set the same filter on a whole deck too # Change the weight weight(slide) <- NULL # to remove weight(slide) <- ds$weight weight(deck) <- ds$weight # Can set the same weight on a whole deck too # Change the transforms transforms(slide) <- list(rows_dimension = makeDimTransform(hide = "Neutral")) # Change the displaySettings displaySettings(slide) <- list(vizType = "groupedBarPlot") # Change the vizSpecs # viz_specs can get quite long, see # https://crunch.io/api/reference/#post-/datasets/-dataset_id-/decks/-deck_id-/slides/ vizSpecs(slide) <- viz_specs # Change the query #' query(slide) <- ~ cyl + wt ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.