The R Project SVN R

Rev

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

Rev 26032 Rev 26104
Line 786... Line 786...
786
	n = length(v);
786
	n = length(v);
787
	PROTECT(rval = allocVector(type, n));
787
	PROTECT(rval = allocVector(type, n));
788
	for (i = 0; i < n;  i++) {
788
	for (i = 0; i < n;  i++) {
789
	    if (isString(VECTOR_ELT(v, i)) && length(VECTOR_ELT(v, i)) == 1)
789
	    if (isString(VECTOR_ELT(v, i)) && length(VECTOR_ELT(v, i)) == 1)
790
		SET_STRING_ELT(rval, i, STRING_ELT(VECTOR_ELT(v, i), 0));
790
		SET_STRING_ELT(rval, i, STRING_ELT(VECTOR_ELT(v, i), 0));
-
 
791
#if 0
-
 
792
	    /* this will make as.character(list(s)) not backquote
-
 
793
	     * non-syntactic name s. It is not entirely clear that
-
 
794
	     * that is really desirable though....
-
 
795
	     */
-
 
796
	    else if (isSymbol(VECTOR_ELT(v, i)))
-
 
797
	    	SET_STRING_ELT(rval, i, PRINTNAME(VECTOR_ELT(v, i)));
-
 
798
#endif
791
	    else
799
	    else
792
		SET_STRING_ELT(rval, i,
800
		SET_STRING_ELT(rval, i,
793
			       STRING_ELT(deparse1line(VECTOR_ELT(v, i), 0), 0));
801
			       STRING_ELT(deparse1line(VECTOR_ELT(v, i), 0), 0));
794
	}
802
	}
795
    }
803
    }
Line 1800... Line 1808...
1800
	t = listAppend(h, t);
1808
	t = listAppend(h, t);
1801
	UNPROTECT(2);
1809
	UNPROTECT(2);
1802
	return t;
1810
	return t;
1803
    }
1811
    }
1804
    else {
1812
    else {
-
 
1813
	/* This could involve deep recursion on long lists, so do tail
1805
	PROTECT(h = substitute(CAR(el), rho));
1814
	 * first to avoid overflowing the protect stack */
1806
	PROTECT(t = substituteList(CDR(el), rho));
1815
	PROTECT(t = substituteList(CDR(el), rho));
-
 
1816
	PROTECT(h = substitute(CAR(el), rho));
1807
	if (isLanguage(el))
1817
	if (isLanguage(el))
1808
	    t = LCONS(h, t);
1818
	    t = LCONS(h, t);
1809
	else
1819
	else
1810
	    t = CONS(h, t);
1820
	    t = CONS(h, t);
1811
	SET_TAG(t, TAG(el));
1821
	SET_TAG(t, TAG(el));