Dear Terry,

One way to locate which file is wrong - surely not the most brillant way! You could do an R script that sources each of your .R files within a "for (file in file.names)" loop. When R will stop, it will indicate which file has a wrong syntax and more info.

Cheers,
Mathieu

Terry Therneau a écrit :
  I'm making the move of the survival package from my own environment to,
and have stumbled into a vacuum.   The R Extensions manual has really nice
instructions about how to lay out the directories, order the files, and
run tests for DISTRIBUTION of a product, but I can't find anything on how
to set up a reasonable DEVELOPMENT environment.
   In my local world, I had the .c and .s files in a common directory, with
a Makefile that I had created, and the test suite in a subdirectory.  Debugging
and development was quite nice.
        make
        cd test
        R
        attach("..")
                try something and perhaps it fails
        q()
        cd ..
Fix and repeat. The Makefile took some time to create, but paid for itself a
hundred times over.
  So, I've now rearranged everything into standard R order.  Then I did the
only thing I could find
R CMD INSTALL ~/myRlib survival where "survival" is said directory. This turns out to be not useful at all. The survival package is large, and I rather suspected that I would goof something up, and I did, resulting in the following message

        Error in parse(n = -1, file = file) : unexpected end of input at
        14450: }
14451: It is not exactly obvious which of the 132 files in my R/ directory is the culprit here.

   In general:
1. The library is large, and recompiling/reparsing everything is very far from
instantaneous.  It is not the edit/load cycle I desire.

2. I take testing seriously: the test suite takes on the order of 15 minutes to
run on a fast machine.  I most certainly don't want to run it in the mid cycle.

   Someone must have tackled this.  I'm hoping that there is some documentation
that I have managed to overlook which discussess a good setup for this middle
ground between concieving of a library and packaging it for delivery; the
"build, test, make sure it acually works" part of development.

        Terry Therneau

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

--
Institute of Mathematics
Ecole Polytechnique Fédérale de Lausanne
STAT-IMA-FSB-EPFL, Station 8
CH-1015 Lausanne   Switzerland
http://stat.epfl.ch/
Tel: + 41 (0)21 693 7907

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to