Yep, found it. I was missing a carriage return in the generator so the closing '}' was ending up on the line above with a comment.
Thanks again. On Sun, May 18, 2014 at 5:40 PM, Timothy W. Cook <[email protected]> wrote: > Thanks Duncan. Exactly what I needed. A push in the right direction to > finding it. > I've already found the file and I am sure to find the problem child soon. > > Cheers, > Tim > > > > On Sun, May 18, 2014 at 5:24 PM, Duncan Murdoch > <[email protected]>wrote: > >> On 18/05/2014, 12:54 PM, Timothy W. Cook wrote: >> >>> This is the error I get attempting to build and install a package I >>> wrote. >>> >>> I am using R Studio (but I did try with R CMDs as well). >>> >>> The file that is blamed in the error is the last file alphabetically. >>> If I >>> remove that file. I get the same error on the remaining last file >>> alphabetically. So my guess is that it isn't actually one of these >>> files. >>> However, I have no clue how to troubleshoot this problem. I am quite >>> new >>> to R. >>> >> >> This indicates that you open a block using "{" (or perhaps "[" or "("), >> but never close it. Unfortunately the parser doesn't tell you where the >> opening brace was. >> >> A quick way to locate which file is to parse your source files one at a >> time; e.g. >> >> for (f in list.files("somedir/R", full.names=TRUE)) parse(f) >> >> This will get an error on the first file with unmatched braces. It won't >> tell you where to look in that file, but it's usually not too hard to find >> that by looking. There are ways to find the spot automatically, but >> they're not trivial: see the discussion of partial parse results in >> ?parse, and fill in a bunch of blanks. Here without much explanation is an >> example. >> >> f <- "some file with unbalanced braces" >> text <- readLines(f) >> src <- srcfile(text) >> parse(text=text, srcfile=src) # Generates error >> >> d <- getParseData(src) >> d[d$token == "'{'" && d$parent == 0,] >> >> This will print something like >> >> line1 col1 line2 col2 id parent token terminal text >> 217 37 3 37 3 217 0 '{' TRUE { >> >> telling you that the brace on line 37 was never matched. If you don't >> find anything, try other kinds of parens or brackets, though they are less >> likely. >> >> Duncan Murdoch >> >> >>> I built a generator to create this R pkg. But it is based on a very >>> similar one that works okay that I built by hand. >>> >>> They are available in their entirety on GitHub at: >>> https://github.com/mlhim/R_test_prj >>> >>> The one that works is: ccdTest244AllDatatypes299a8123d9f7 >>> >>> The one that doesn't work is: ccdTest244AllDatatypesa5c7aca0036f >>> >>> The 00install.out file isn't particularly enlightening: >>> ------------------------------------------------------------ >>> ----------------- >>> * installing *source* package >>> ââ¬ËccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> ... >>> >>> ** R >>> Error in parse(outFile) : >>> >>> /home/tim/MLHIM/git/R_test_prj/ccdTest244AllDatatypesa5c7aca0 >>> 036f.Rcheck/00_pkg_src/ccdTest244AllDatatypesa5c7aca0036f/R/meta :43:0: >>> unexpected end of input >>> 41: return(' >>> http://www.ccdgen.com/ccdlib/ccd-31598ac4-eac4-4f45-928e- >>> a5c7aca0036f.xsd') >>> 42: } >>> ^ >>> ERROR: unable to collate and parse R files for package >>> ââ¬ËccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> * removing >>> ââ¬Ë/home/tim/MLHIM/git/R_test_prj/ccdTest244AllDatatypesa5c7aca0 >>> 036f.Rcheck/ccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> >>> >>> >>> * installing *source* package >>> ââ¬ËccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> ... >>> >>> ** R >>> Error in parse(outFile) : >>> >>> /home/tim/MLHIM/git/R_test_prj/ccdTest244AllDatatypesa5c7aca0 >>> 036f.Rcheck/00_pkg_src/ccdTest244AllDatatypesa5c7aca0036f/R/meta :43:0: >>> unexpected end of input >>> 41: return(' >>> http://www.ccdgen.com/ccdlib/ccd-31598ac4-eac4-4f45-928e- >>> a5c7aca0036f.xsd') >>> 42: } >>> ^ >>> ERROR: unable to collate and parse R files for package >>> ââ¬ËccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> * removing >>> ââ¬Ë/home/tim/MLHIM/git/R_test_prj/ccdTest244AllDatatypesa5c7aca0 >>> 036f.Rcheck/ccdTest244AllDatatypesa5c7aca0036fââ¬â¢ >>> >>> ------------------------------------------------------------- >>> >>> Any help is greatly appreciated. >>> >>> This is part of a large open source effort in healthcare interoperability >>> and data analysis. >>> >>> Thanks In Advance, >>> Tim >>> >>> >>> ============================================ >>> Timothy Cook >>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook >>> MLHIM http://www.mlhim.org >>> >>> [[alternative HTML version deleted]] >>> >>> >>> >>> ______________________________________________ >>> [email protected] mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide http://www.R-project.org/ >>> posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >>> >> > > > -- > > ============================================ > Timothy Cook > LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > MLHIM http://www.mlhim.org > > -- ============================================ Timothy Cook LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook MLHIM http://www.mlhim.org [[alternative HTML version deleted]]
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

