From gah4 at u.washington.edu  Wed Aug 30 00:59:13 2006
From: gah4 at u.washington.edu (gah4 at u.washington.edu)
Date: Wed, 30 Aug 2006 00:59:13 +0200 (CEST)
Subject: [Rd] list and pairlist in "Writing R Extensions" (PR#9185)
Message-ID: <20060829225913.66DCE18398@slim.kubism.ku.dk>

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




[Rd] list and pairlist in "Writing R Extensions" (PR#9185)
gah4 at u.washington.edu