[Rd] list and pairlist in "Writing R Extensions" (PR#9185)

gah4 at u.washington.edu gah4 at u.washington.edu
Wed Aug 30 00:59:13 CEST 2006


Full_Name: Glen Herrmannsfeldt
Version: 2.2.1
OS: Linux
Submission from: (NULL) (128.95.113.77)


Following the discussion in "Writing R Extensions" in section 5.8.2, there
is no indication that showArgs expects a pairlist() instead of a list().

I was trying 

.Call("showArgs",list(one=1,two=2,three=3))

for example, and getting many core dumps.

It wasn't until reading "R Language Definition" that I found out
about pairlist(), as needed.  

The final example:

showArgs<-function(...) .Call("showArgs1",list(...))

looks like a list can be passed to showArgs, but in fact it is showArgs1, which
doesn't seem to be documented at all!

It could be that using pairlist() in 5.8.2 would fix the problem,
but there should be a reference to the difference between list()
and pairlist()

thanks,

-- glen




More information about the R-devel mailing list