Skip to content

Instantly share code, notes, and snippets.

@MarcinKosinski
Created March 22, 2018 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinKosinski/03d378cc20ff5b9260478fb25d45be0f to your computer and use it in GitHub Desktop.
Save MarcinKosinski/03d378cc20ff5b9260478fb25d45be0f to your computer and use it in GitHub Desktop.
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
Copy link

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