[R-pkg-devel] winbuilder - missing global definitions / error in example latex code stdout

2016-01-19 Thread Sven E. Templer
Hello everybody,

i uploaded a package to the win-builder.r-project.org (R-devel) and received a 
00check.log that NOTifiEs about missing visible global functions. Please see 
http://win-builder.r-project.org/WZnnzaSqBse4/00check.log 
at the lines following: 
* checking R code for possible problems ... NOTE

This is not happening on local Darwin and Linux (64bit) (R 3.2.3) checks, nor 
on the win-builder R-release, e.g. see
http://win-builder.r-project.org/a83iezxtXSg4/00check.log

Despite, on both win-builder checks, I recognized errors (not on local Darwin 
and Linux) running examples that print latex code (see the logs from above).

Two questions:

a) Is the 'missing global functions' issue in win-builder R-devel a planned 
change in the R future release, so one will need to import base functions in 
future, or is it an unsolved issue in the developmental stage?

b) Is it (also for Linux and Darwin) suggested to '\dontrun{}' examples with 
standard output (esp. in latex code)?

Many thanks for enlightening me,
Sven
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD check yielding different results for me than CRAN reviewer

2016-01-26 Thread Sven E. Templer
Dear Adah,

win-builder is fairly easy, but once you've setup a github repository using

https://github.com/metacran/r-builder

you might save even that few amount of work.

Best,
Sven

> On 26 Jan 2016, at 20:54, Dirk Eddelbuettel  wrote:
> 
> 
> On 26 January 2016 at 14:03, Adah Zhang wrote:
> | I am running R CMD check (and also with the --as-cran flag), which results
> | in all OK's in my 00check.log. However, after submitting the package, the
> | CRAN reviewer tells me of a warning/error regarding one of my examples
> | (which is easily fix-able if I got the warning myself).
> | 
> | How do I ensure that all warnings, errors, and notes are addressed if I do
> | not receive these when running the standard checks or when testing the
> | examples myself? Is there a standard order of commands that a CRAN reviewer
> | goes through aside from 'R CMD check'?
> 
> "Use a different computer."
> 
> That is not as flippant as it sounds because
> 
> -- thanks to Uwe you have r-release and r-devel on Windows just one ftp
>submission away
> 
> -- thanks to Carl and yours truly you can also try a variety of Docker
>containers for R including r-devel prebuilt and even SAN/ASAN/UBSAN
>flavours
> 
> -- the remainer of campus should offer some choices too though that relies
>on your local contacts.
> 
> Sometimes these things are of course also due to something else but as you
> supplied nothing concrete or reproducible I cannot be more specific either.
> 
> Hope this helps.  It's the right list for the question.
> 
> Dirk
> 
> -- 
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> 
> __
> 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] duplicate function during build

2016-07-22 Thread Sven E. Templer
Not during build, but before, you could run in a bash from the package source 
root:

$ awk '/function/{print $1}' R/* | uniq -d

To find the files, use:

$ grep  R/*

Best wishes,

Sven

> On 23 Jul 2016, at 05:01, ProfJCNash  wrote:
> 
> In trying to rationalize some files in a package I'm working on, I
> copied a function from one file to another, but forgot to change the
> name of one of them. It turns out the name of the file containing the
> "old" function was later in collation sequence than the one I was
> planning to be the "new" one. To debug some issues, I put some print()
> and cat() statements in the "new" file, but after building the package,
> they weren't there. Turns out the "old" function got installed, as might
> be expected if files processed in order. Debugging this took about 2
> hours of slightly weird effort with 2 machines and 3 OS distributions
> before I realized the problem. It's fairly obvious that I should expect
> issues in this case, but not so clear how to detect the source of the
> problem.
> 
> Question: Has anyone created a script to catch such duplicate functions
> from different files during build? I think a warning message that there
> are duplicate functions could save some time and effort. Maybe it's
> already there, but I saw no obvious message. In this case, I'm only
> working in R.
> 
> I've found build.R in the R tarball, which is where I suspect such a
> check should go, and I'm willing to prepare a patch when I figure out
> how this should be done. However, it seems worth asking if anyone has
> needed to do this before. I've already done some searching, but the
> results seem to pick up quite different posts than I need.
> 
> Cheers, JN
> 
> __
> 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] duplicate function during build

2016-07-23 Thread Sven E. Templer
Despite it might help, learning/using git is not tackling this specific 
problem, I suggest code that does:

sed -e 's/^[\ \t]*//' -e 's/#.*//' R/* | awk '/function/{print $1}' | sort | 
uniq -d

or

https://gist.github.com/setempler/7fcf2a3a737ce1293e0623d2bb8e08ed
(any comments welcome)

If one knows coding R, it might be more productive developing a tiny tool for 
that, instead of learning a new (and complex) one (as git).

Nevertheless, git is great!

Best wishes,

Sven

---

web: www.templer.se
twitter: @setempler
> On 23 Jul 2016, at 16:17, Hadley Wickham  wrote:
> 
> I think this sort of meta problem is best solved with svn/git because you
> can easily see if the changes you think you made align with the changes you
> actually made. Learning svn or git is a lot of work, but the payoff is
> worth it.
> 
> Hadley
> 
> On Friday, July 22, 2016, ProfJCNash  wrote:
> 
>> In trying to rationalize some files in a package I'm working on, I
>> copied a function from one file to another, but forgot to change the
>> name of one of them. It turns out the name of the file containing the
>> "old" function was later in collation sequence than the one I was
>> planning to be the "new" one. To debug some issues, I put some print()
>> and cat() statements in the "new" file, but after building the package,
>> they weren't there. Turns out the "old" function got installed, as might
>> be expected if files processed in order. Debugging this took about 2
>> hours of slightly weird effort with 2 machines and 3 OS distributions
>> before I realized the problem. It's fairly obvious that I should expect
>> issues in this case, but not so clear how to detect the source of the
>> problem.
>> 
>> Question: Has anyone created a script to catch such duplicate functions
>> from different files during build? I think a warning message that there
>> are duplicate functions could save some time and effort. Maybe it's
>> already there, but I saw no obvious message. In this case, I'm only
>> working in R.
>> 
>> I've found build.R in the R tarball, which is where I suspect such a
>> check should go, and I'm willing to prepare a patch when I figure out
>> how this should be done. However, it seems worth asking if anyone has
>> needed to do this before. I've already done some searching, but the
>> results seem to pick up quite different posts than I need.
>> 
>> Cheers, JN
>> 
>> __
>> R-package-devel@r-project.org  mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>> 
> 
> 
> -- 
> http://hadley.nz
> 
>   [[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] Issue with including vignettes without building package

2017-04-20 Thread Sven E Templer
Hi Alex,


what if you run

devtools::install_github(build_vignettes = TRUE)

on your students computer?

See ?devtools::install


Best,

Sven


> On 20. Apr 2017, at 15:09, Alexandre Courtiol  
> wrote:
> 
> Dear all,
> 
> I am using a package for teaching:
> my slides are html vignettes, and it is convenient for students to control
> which packages they must install, provide code and datasets.
> 
> As I am often editing the package live during the course, it would be great
> if I could just push to github and that the student would just have to run
> a devtools::install_github() to get my updated vignettes. I would rather
> not to have to build the package before pushing to save time.
> 
> The issues is that I do not want to build the vignettes on install as they
> are very slow to build. On my computer however it is quick because I have
> cached the knitr chunks output. So I was hoping to just have to run
> devtools::build_vignettes() on my machine before pushing the files thereby
> created (./inst/doc) and that the student could just
> devtools::install_github().
> 
> I cannot make this work: no vignettes are found after install. When I do
> check the repository beeing installed on their computers, the html, Rmd and
> R files corresponding to the vignettes are present in ./doc, so it is not
> an issue of having the wrong .gitgnore configuration.
> 
> I have read about many vignettes related issues on the net, but I did not
> find something dealing with this precise issue.
> 
> PS: I know about the R.rsp hack, but I would prefer to find a solution more
> direct.
> 
> Best,
> 
> Alex
> 
> 
> 
> 
> -- 
> Alexandre Courtiol
> 
> http://sites.google.com/site/alexandrecourtiol/home
> 
> *"Science is the belief in the ignorance of experts"*, R. Feynman
> 
>   [[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