Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
library(dplyr);library(crunch)
iris_ds <-
newDataset(iris, name = 'iris')
# how to add the following data.frame as a CrunchCube or something similar to the Array?
iris_ds$some_statistics <-
iris %>%
group_by(Species) %>%
summarize_all(funs(mean))
@GitBrianLaw

This comment has been minimized.

Copy link

@GitBrianLaw GitBrianLaw commented Mar 28, 2018

Hello Marcin.

Crunch is meant to store respondent level data, not summary tables of those respondents.

Can you say more about exactly what you're trying to do? Here is the vignette on how to do numeric aggregations on a Crunch respondent level dataset, which may already have the functions you need: http://crunch.io/r/crunch/articles/analyze.html (do a find on that page for "mean").

Brian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment