Navigation Menu

Skip to content

Commit

Permalink
test all variables through the whiet list in arrange. #266
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Feb 19, 2014
1 parent 7c270a8 commit a9b161d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dplyr.cpp
Expand Up @@ -1206,6 +1206,17 @@ IntegerVector order_impl( List args, Environment env ){

// [[Rcpp::export]]
DataFrame arrange_impl( DataFrame data, List args, DataDots dots ){
// checking variables are on the white list
int nc = data.size() ;
for( int i=0; i<nc; i++){
if( !white_list(data[i]) ){
std::stringstream ss ;
CharacterVector names = data.names() ;
ss << "column '" << names[i] << "' has unsupported type" ;
stop(ss.str()) ;
}
}

int nargs = args.size() ;
List variables(nargs) ;
LogicalVector ascending(nargs) ;
Expand Down

0 comments on commit a9b161d

Please sign in to comment.