Skip to content
Back to formatted view

Raw Message

Message-ID: <49AB2A28.5040805@stats.uwo.ca>
Date: 2009-03-02T00:36:56Z
From: Duncan Murdoch
Subject: a very basic question: calling c function from R
In-Reply-To: <243BC6417ADA0B4FACE96D31041FD621FA34D4F15F@MAILBOX.usilu.net>

On 01/03/2009 7:23 PM, Wang Chun wrote:
> Dear R users,
> 
> I want to call C function from R. I follow the following instruction using the example of foo.c
> http://www.stat.umn.edu/~charlie/rc/
> 
> I save the foo.c in my current directory. Is that right? After I enter the command R CMD SHLIB foo.c, I get the following message
> 
> 
> 
> Error: unexpected symbol in "R cmd"
> 
> 
> 
> Any suggestion is appreciated.

It looks as though you did that within R.  The R CMD SHLIB command is a 
shell command, run outside of R.

Duncan Murdoch