search for: r_rownamessymbol

Displaying 5 results from an estimated 5 matches for "r_rownamessymbol".

2007 Apr 18
1
undefined symbol: Rf_rownamesgets
...y package, which include C++ code that calls that function. This is particularly strange since the code also calls Rf_classgets, and it loaded OK with just that. Can anyone tell me what's going on? For the record, I worked around this with the general purpose attribute setting commands and R_RowNamesSymbol. I discovered that even with that I wasn't constructing a valid data.frame, and fell back to returning a list of results. I notice Rinternals.h defines LibExtern SEXP R_RowNamesSymbol; /* "row.names" */ twice in the same block of code. I'm using R 2.4.1 on Debian. The symbol...
2014 Jun 24
2
using C code to create data frame but always return as list
..._NamesSymbol,names);   UNPROTECT(1);  }   //set row names  sprintf(evalcmd,"size(%s,1)",dfname);  jl_value_t* rows=jl_eval_string(evalcmd);  int rowlen=jl_unbox_long(rows);  PROTECT(rownames=allocVector(INTSXP,rowlen));  for (i=0;i<rowlen;i++)   INTEGER(rownames)[i]=i+1;  setAttrib(ans,R_RowNamesSymbol,rownames);  UNPROTECT(1);  //set class as data frame  setAttrib(ans,R_ClassSymbol,mkString("data.frame"));  UNPROTECT(1);  return ans; } [[alternative HTML version deleted]]
2014 Apr 03
1
question regarding lang2 command in C
Hi , I am asking too many questions , sorry for that . I am creating a data frame in C itself , reading a table . The data frame calling code looks like this ====================================== *PROTECT(dfm=lang2(install("data.frame"),df));* *SEXP res = PROTECT(eval(dfm,R_GlobalEnv));* UNPROTECT(2); return res; ================================== It works fine , now the problem
2014 Apr 02
0
special handling of row.names
...[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; } I believe it should be INTEGER(val)[1] = -n; for consistency. BTW, perhaps structure should be internalized to prevent special handling of row.names when it does not make sense. Here is structure: structure function (.Data, ...) { attrib <...
2007 Jul 14
1
row names and identical
Below x1, x2 and x3 all have the same data and all have the same value for row.names(x); however, the internal values of their row.names differ. The internal value of row.names is c(NA, -4L) for x1, c(NA, 4L) for x2 and c("1", "2", "3", "4") for x3; nevertheless, identical regards x1 and x2 as identical while x3 is not identical to either of x1 or x2. Is