The R Project SVN R

Rev

Rev 87432 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87432 Rev 87462
Line 98... Line 98...
98
	SET_STRING_ELT(ansnames, 0, mkChar("x"));
98
	SET_STRING_ELT(ansnames, 0, mkChar("x"));
99
	SET_STRING_ELT(ansnames, 1, mkChar("ix"));
99
	SET_STRING_ELT(ansnames, 1, mkChar("ix"));
100
	setAttrib(ans, R_NamesSymbol, ansnames);
100
	setAttrib(ans, R_NamesSymbol, ansnames);
101
	UNPROTECT(4);
101
	UNPROTECT(4);
102
	return ans;
102
	return ans;
-
 
103
    } else { // not indx_ret
-
 
104
	// do not need to sort 0-length array
103
    } else {
105
	if( n > 0) {
104
	if(x_int)
106
	    if(x_int)
105
	    R_qsort_int(ivx, 1, n);
107
		R_qsort_int(ivx, 1, n);
106
	else
108
	    else
107
	    R_qsort(vx, 1, n);
109
		R_qsort(vx, 1, n);
-
 
110
	}
108
 
111
 
109
	UNPROTECT(1);
112
	UNPROTECT(1);
110
	return sx;
113
	return sx;
111
    }
114
    }
112
}
115
}