migue-s
8/4/2011 - 11:34 PM

R: List Variables

R: List Variables

# Without sorting:

head(theDataframe[,c("theVariable1","theVariable2")], n = 20)


# With sorting by one variable:

head(theDataframe[order(theDataframe$theVariable1),c("theVariable1","theVariable2")], n = 20)


# With sorting by two variables:

head(theDataframe[order(theDataframe$theVariable1,theDataframe$theVariable2),c("theVariable1","theVariable2")], n = 20)