How To: How do I compute group means for a number of variables in an .xdf file?

The easiest way to do this is to use the 'rowSelection' argument. Here is a short example, that uses it with the RevoScaleR sample dataset 'CensusWorkers.xdf': 

inFile <- file.path(rxGetOption("sampleDataDir"), "CensusWorkers") 
rxCube(incwage ~ sex : state, data = inFile, rowSelection = age >=30 & age <=50 & wkswork1 > 40, means=TRUE)
   
Properties

Article ID: 3104265 - Last Review: Oct 29, 2015 - Revision: 1

Revolution Analytics

Feedback