src/export/exported.c
int r_as_int(sexp* x) {
  switch(r_typeof(x)) {
  case r_type_integer: return *INTEGER(x);
  case r_type_double: return (int) *REAL(x);
  default: r_abort("Internal error: Expected integerish input");
  }
}
// TODO: C-level check for scalar integerish
C-level check for scalar integerish
C - level check for scalar integerish
int r_as_int(sexp* x) {
  switch(r_typeof(x)) {
  case r_type_integer: return *INTEGER(x);
  case r_type_double: return (int) *REAL(x);
  default: r_abort("Internal error: Expected integerish input");
  }
}
int r_as_int ( sexp * x ) { switch ( r_typeof ( x ) ) { case r_type_integer : return * INTEGER ( x ) ; case r_type_double : return ( int ) * REAL ( x ) ; default : r_abort ( " " ) ; } }
TODO: C-level check for scalar integerish
TODO : C - level check for scalar integerish