Re: [R-pkg-devel] Unexpected symbol when checking package examples

2018-11-12 Thread Duncan Murdoch

On 11/11/2018 7:01 PM, Duncan Murdoch wrote:

On 11/11/2018 6:53 PM, Duncan Murdoch wrote:

On 11/11/2018 3:39 PM, Jared Knowles wrote:

Hi!

I have a bit of a weird issue when I'm trying to check my package merTools
(source repo available here: https://github.com/jknowles/merTools

On Windows and Linux builds for R-release and R-devel, when R CMD CHECK
checks examples, it returns the following error below:

Warning: parse error in file 'merTools-Ex.R':
1: unexpected symbol
117: cleanEx()
118: nameEx


I also get this error on MacOS.




Upon inspecting the example file generated by R CMD CHECK (mertools-Ex.R) -
it contains only valid R code. I can run it line by line or source the
whole file in R without any errors. But, during the check process, this
error occurs.


The problem is in the REimpact help file.  It contains this:

zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", breaks
= 5,

and there's no closing paren.

This is in a \donttest section of the examples, so it gets deleted when
running the examples, and that's the version of merTools-Ex.R that is
left at the end.  But the warning happened in a different test,

* checking for unstated dependencies in examples ... WARNING
Warning: parse error in file 'merTools-Ex.R':
1: unexpected symbol
118: cleanEx()
119: nameEx
^

and it is based on a different version of that file that doesn't omit
the \donttest section.

This is arguably an R bug:  the line numbers are misleading, since they
refer to a version of the file that no longer exists.  Perhaps when you
say \donttest, no tests should be done.


Cancel that last sentence:  if you run "example(REimpact)", you get a
syntax error message, because \donttest is not the same as \dontrun.  So
this has to be fixed in the original file.

But the first part is still right:  you shouldn't say the problem is on
line 119 of 'merTools-Ex.R', and then rewrite the file so that line
isn't there any more.


I have submitted a bug report 
(https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17501) about this.


Duncan Murdoch

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


Re: [R-pkg-devel] Fwd: [CRAN-pretest-archived] CRAN submission maGUI 2.3

2018-11-12 Thread Martin Morgan
I cannot tell whether this will be helpful or not. It looks to me like the 
warning occurs when one of your dependencies uses BiocInstaller. You could 
create a database of all available packages

  chooseCRANmirror()
  chooseBioCmirror()
  db = available.packages()

find the installation dependencies of your package dependencies

  flds = c("Depends", "Imports", "LinkingTo")
  pkgs = read.dcf("DESCRIPTION", flds)[, flds]
  pkgs = trimws(unlist(strsplit(pkgs, ","), use.names = FALSE))
  pkgs = pkgs[!is.na(pkgs)]

and discover which references BiocInstaller

  deps = tools::package_dependencies(pkgs, db, recursive = TRUE)
  unlist(deps)["BiocInstaller" %in% unlist(deps)]

But actually when I run this with version 2.2 of your package I don't see a 
dependency on BiocInstaller (other than in your own package).

Martin

On 11/11/18, 9:55 PM, "R-package-devel on behalf of dhamma pal" 
 
wrote:

The latest version donot use BIOCINSTALLER or bioclite, still getting a
warning.

Errors are not detected in the current version, i.e. 2.3 version of maGUI.
But errors are getting reported in the earlier version i.e., 2.2 which is
not the making the current version to pass through the CRAN. I have tried
to submit the corrected  package with version 2.2 to rectify the errors,
but getting overriden error. Now how to ugrade maGUI to 2.3?
Thanks in advance.


-- Forwarded message -
From: 
Date: Thu, 8 Nov 2018, 1:12 pm
Subject: [CRAN-pretest-archived] CRAN submission maGUI 2.3
To: 
Cc: 


Dear maintainer,

package maGUI_2.3.tar.gz does not pass the incoming checks automatically,
please see the following pre-tests:
Windows: <

https://win-builder.r-project.org/incoming_pretest/maGUI_2.3_20181108_081501/Windows/00check.log
>
Status: 1 WARNING, 1 NOTE
Debian: <

https://win-builder.r-project.org/incoming_pretest/maGUI_2.3_20181108_081501/Debian/00check.log
>
Status: 1 NOTE

Last released version's CRAN status: ERROR: 2
See: 

CRAN Web: 

Please fix all problems and resubmit a fixed version via the webform.
If you are not sure how to fix the problems shown, please ask for help on
the R-package-devel mailing list:

If you are fairly certain the rejection is a false positive, please
reply-all to this message and explain.

More details are given in the directory:
<

https://win-builder.r-project.org/incoming_pretest/maGUI_2.3_20181108_081501/
>
The files will be removed after roughly 7 days.

No strong reverse dependencies to be checked.

Best regards,
CRAN teams' auto-check service
Flavor: r-devel-linux-x86_64-debian-gcc, r-devel-windows-ix86+x86_64
Check: CRAN incoming feasibility, Result: NOTE
  Maintainer: 'Dhammapal Bharne '

  New submission

  Package was archived on CRAN

  CRAN repository db overrides:
X-CRAN-Comment: Archived on 2018-11-01 as check warnings were not
  corrected despite a month's notice.

Needed change for BioC 3.8

Flavor: r-devel-windows-ix86+x86_64
Check: whether package can be installed, Result: WARNING
  Found the following significant warnings:
Warning: 'BiocInstaller' and 'biocLite()' are deprecated, use the
'BiocManager' CRAN
  See 'd:/RCompile/CRANincoming/R-devel/maGUI.Rcheck/00install.out' for
details.

[[alternative HTML version deleted]]

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

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


Re: [R-pkg-devel] Unexpected symbol when checking package examples

2018-11-12 Thread Jared Knowles
Thank you so much for the help!

The origin of this mistake was mine - I forgot a ' following a # in my
roxygen example code - which meant roxygen ignored the closing parens on
the next line. (See example)

\donttest{
#' # You can also pass additional arguments to predictInterval through
REimpact
#' g1 <- lmer(y ~ lectage + studage + (1|d) + (1|s), data=InstEval)
#' zed <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", n.sims
= 50,
#' include.resid.var = TRUE)
#' zed2 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "s", n.sims
= 50,
#'  include.resid.var = TRUE)
#' zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", breaks
= 5,
# n.sims = 50, include.resid.var = TRUE)
#' }

Thanks everyone for the help. I never would have found this mistake without
this list.

 Jared


On Sun, Nov 11, 2018 at 6:53 PM Duncan Murdoch 
wrote:

> On 11/11/2018 3:39 PM, Jared Knowles wrote:
> > Hi!
> >
> > I have a bit of a weird issue when I'm trying to check my package
> merTools
> > (source repo available here: https://github.com/jknowles/merTools
> >
> > On Windows and Linux builds for R-release and R-devel, when R CMD CHECK
> > checks examples, it returns the following error below:
> >
> > Warning: parse error in file 'merTools-Ex.R':
> > 1: unexpected symbol
> > 117: cleanEx()
> > 118: nameEx
>
> I also get this error on MacOS.
>
> >
> >
> > Upon inspecting the example file generated by R CMD CHECK
> (mertools-Ex.R) -
> > it contains only valid R code. I can run it line by line or source the
> > whole file in R without any errors. But, during the check process, this
> > error occurs.
>
> The problem is in the REimpact help file.  It contains this:
>
> zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", breaks
> = 5,
>
> and there's no closing paren.
>
> This is in a \donttest section of the examples, so it gets deleted when
> running the examples, and that's the version of merTools-Ex.R that is
> left at the end.  But the warning happened in a different test,
>
> * checking for unstated dependencies in examples ... WARNING
> Warning: parse error in file 'merTools-Ex.R':
> 1: unexpected symbol
> 118: cleanEx()
> 119: nameEx
>   ^
>
> and it is based on a different version of that file that doesn't omit
> the \donttest section.
>
> This is arguably an R bug:  the line numbers are misleading, since they
> refer to a version of the file that no longer exists.  Perhaps when you
> say \donttest, no tests should be done.
>
> Duncan Murdoch
>
>
>
> > The functions cleanEx() and nameEx() appear to be created as part of the
> > checking process.
> >
> > I have not changed the examples in the code since the last time I ran R
> CMD
> > CHECK so I am quite confident that the example code for all functions is
> > valid R code.
> >
> > Any ideas on what might be the source of this problem?
> >
> > Thanks!
> >   Jared
> >
> >
> >
> > Jared Knowles
> > President, Civilytics Consulting LLC
> > www.jaredknowles.com
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
>

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Unexpected symbol when checking package examples

2018-11-12 Thread Duncan Murdoch

On 12/11/2018 7:56 AM, Jared Knowles wrote:

Thank you so much for the help!

The origin of this mistake was mine - I forgot a ' following a # in my 
roxygen example code - which meant roxygen ignored the closing parens on 
the next line. (See example)


\donttest{
#' # You can also pass additional arguments to predictInterval through 
REimpact

#' g1 <- lmer(y ~ lectage + studage + (1|d) + (1|s), data=InstEval)
#' zed <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", 
n.sims = 50,

#' include.resid.var = TRUE)
#' zed2 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "s", 
n.sims = 50,

#'  include.resid.var = TRUE)
#' zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", 
breaks = 5,

# n.sims = 50, include.resid.var = TRUE)
#' }

Thanks everyone for the help. I never would have found this mistake 
without this list.


Perhaps roxygen should try parsing the code it inserts as examples.  It 
can probably give a better error message than R could, since it knows 
which .R file it's looking at when the problem happens.


Duncan Murdoch



  Jared


On Sun, Nov 11, 2018 at 6:53 PM Duncan Murdoch > wrote:


On 11/11/2018 3:39 PM, Jared Knowles wrote:
 > Hi!
 >
 > I have a bit of a weird issue when I'm trying to check my package
merTools
 > (source repo available here: https://github.com/jknowles/merTools
 >
 > On Windows and Linux builds for R-release and R-devel, when R CMD
CHECK
 > checks examples, it returns the following error below:
 >
 > Warning: parse error in file 'merTools-Ex.R':
 > 1: unexpected symbol
 > 117: cleanEx()
 > 118: nameEx

I also get this error on MacOS.

 >
 >
 > Upon inspecting the example file generated by R CMD CHECK
(mertools-Ex.R) -
 > it contains only valid R code. I can run it line by line or
source the
 > whole file in R without any errors. But, during the check
process, this
 > error occurs.

The problem is in the REimpact help file.  It contains this:

zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d",
breaks
= 5,

and there's no closing paren.

This is in a \donttest section of the examples, so it gets deleted when
running the examples, and that's the version of merTools-Ex.R that is
left at the end.  But the warning happened in a different test,

* checking for unstated dependencies in examples ... WARNING
Warning: parse error in file 'merTools-Ex.R':
1: unexpected symbol
118: cleanEx()
119: nameEx
       ^

and it is based on a different version of that file that doesn't omit
the \donttest section.

This is arguably an R bug:  the line numbers are misleading, since they
refer to a version of the file that no longer exists.  Perhaps when you
say \donttest, no tests should be done.

Duncan Murdoch



 > The functions cleanEx() and nameEx() appear to be created as part
of the
 > checking process.
 >
 > I have not changed the examples in the code since the last time I
ran R CMD
 > CHECK so I am quite confident that the example code for all
functions is
 > valid R code.
 >
 > Any ideas on what might be the source of this problem?
 >
 >                 Thanks!
 >                   Jared
 >
 >
 >
 > Jared Knowles
 > President, Civilytics Consulting LLC
 > www.jaredknowles.com 
 >
 >       [[alternative HTML version deleted]]
 >
 > __
 > R-package-devel@r-project.org
 mailing list
 > https://stat.ethz.ch/mailman/listinfo/r-package-devel
 >



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