search for: row_names_gets

Displaying 2 results from an estimated 2 matches for "row_names_gets".

2012 Aug 28
1
Don't dput() data frames?
/src/main/attrib.c contains this comment in row_names_gets(): /* This should not happen, but if a careless user dput()s a data frame and sources the result, it will */ which svn blame says Prof Ripley placed there in r39830 with the commit message "correct the work of dput() on the row names of a data frame with compact representation.&...
2014 Apr 02
0
special handling of row.names
...@104f088c8 13 INTSXP g0c1 [] (len=2, tl=0) -2147483648,10 TAG: @100823548 01 SYMSXP g1c0 [MARK,LCK,gp=0x4000] "class" (has value) @104f08838 16 STRSXP g0c1 [] (len=1, tl=0) @1008a7e60 09 CHARSXP g1c2 [MARK,gp=0x61,ATT] [ASCII] [cached] "data.frame" This happens in row_names_gets (attrib.c), here: if(OK_compact) { /* we hide the length in an impossible integer vector */ PROTECT(val = allocVector(INTSXP, 2)); INTEGER(val)[0] = NA_INTEGER; INTEGER(val)[1] = n; ans = installAttrib(vec, R_RowNamesSymbol, val); UNPROTECT(1); return ans; }...