1 #include <R.h>
2 #include <Rinternals.h>
3 
R_bit_set_attr(SEXP x,SEXP which,SEXP value)4 void R_bit_set_attr(SEXP x, SEXP which, SEXP value)
5 {
6   /* xx looking at R sources setAttrib would directly accept a string, however this is not documented */
7   setAttrib(x, install(CHAR(STRING_ELT(which, 0))), value);
8 }
9