Skip to content
Prev 58639 / 398502 Next

conv() example in R-exts

Hi

[I'm not sure if this is "intelligible to non-programmers" or not]

R-exts  (section 4.2) gives an example  of the .C() function whose 
third argument is

"as.integer(length(a))",

and urges the user to coerce all the arguments to the correct form 
(on pain of  "hard-to-catch errors"
which I now know to be very appropriate, if understated,  phrasing).

  The length()  function returns an integer, according to the helppage.

So, why does the argument above use as.integer()?