The R Project SVN R

Rev

Rev 51274 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51274 Rev 52828
Line 249... Line 249...
249
vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call) 
249
vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call) 
250
{
250
{
251
    int i, offset;
251
    int i, offset;
252
 
252
 
253
    for(i = start; i < stop; i++) {
253
    for(i = start; i < stop; i++) {
254
	if(!isVectorList(x) && !isPairList(x))
254
	if(!isVectorList(x) && !isPairList(x)) {
-
 
255
	    if (i)
255
	    errorcall(call, _("recursive indexing failed at level %d\n"), i+1);
256
		errorcall(call, _("recursive indexing failed at level %d\n"), i+1);
-
 
257
	    else
-
 
258
		errorcall(call, _("attempt to select more than one element"));
-
 
259
	}
256
	offset = get1index(thesub, getAttrib(x, R_NamesSymbol),
260
	offset = get1index(thesub, getAttrib(x, R_NamesSymbol),
257
		           length(x), pok, i, call);
261
		           length(x), pok, i, call);
258
	if(offset < 0 || offset >= length(x))
262
	if(offset < 0 || offset >= length(x))
259
	    errorcall(call, _("no such index at level %d\n"), i+1);
263
	    errorcall(call, _("no such index at level %d\n"), i+1);
260
	if(isPairList(x)) {
264
	if(isPairList(x)) {