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)