Re: [R] Adding .R to source file keeps R from reading it?

From: Izmirlian, Grant (NIH/NCI) [E] <>
Date: Sat 23 Sep 2006 - 00:47:35 GMT

So...are you trying to modify a contributed package by adding a *.R file to the 'R' subdirectory in the package? One thing to consider besides the previous tip is that the package might be using a NAMESPACE, which lives in the package root directory (one directory up from the 'R' subdirectory). If so, then you must add the name of your function to the argument list of the call to 'export' in the NAMESPACE file

e.g. export(sortgenes, pvalues, MyFunction)

-----Original Message-----
From: John Tillinghast [] Sent: Thu 9/21/2006 9:55 PM
Subject: Re: [R] Adding .R to source file keeps R from reading it?  

Yes, this was exactly the problem: I was using the unzipped package, not the source.
Now it works!

On 9/21/06, John Tillinghast <> wrote:
> Hi,
> I'm updating the LMGene package from Bioconductor. "Writing R Extensions"
> suggests
> that all source files (the ones in the R directory) have a .R ending, so I
> added it to the (one) source file.
> The next time I installed and ran R, R didn't understand any of the
> functions.
> I tried various things and eventually went back to the file and dropped
> .R ending, installed, ran R. It worked!
> For purposes of distributing the package, do I want to leave the name
> without the .R, or add the .R and change something else?

I'm guessing that the "source" you are working on has been obtained by unzipping the windows binary zip file. Despite appearances, that is not the source code. For the proper source code, download the file that's marked as source. In this case,

clearly labels the following as "Source" (and the corresponding zip file as "Windows Binary")

This likely answers your other question as well.


        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat Sep 23 11:04:28 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 23 Sep 2006 - 03:30:06 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.