Re: [R-pkg-devel] Is there an Rtools40 changelog?

2020-05-12 Thread Jeroen Ooms
On Sun, May 10, 2020 at 11:31 PM James Lamb  wrote:
>
> Hello,
>
> I am a maintainer on the LightGBM project, focused on that project's R
> package. The R package is not available on CRAN yet (we are working on it),
> so for now our users must build it from source.
>
> The package includes compilation of a C++ library, and we link to R.dll /
> R.so to use R-provided functions like Rprintf.
>
> With the release of R4.0 and Rtools40, we recently received reports from
> our users that they are unable to build our package on Windows systems with
> R 4.0 and Rtools 4.0 (https://github.com/microsoft/LightGBM/issues/3064).
>
> After some investigation, I've learned that the following changes in
> Rtools40 (relative to Rtools35) broke our installation process:
>
>- *gendef.exe* was removed
>- *mingw32-make.exe* was removed
>- paths like "mingw_64/bin" were changed to "mingw64/bin"
>

Some utilities that were previously bundled with all rtools
installations can now be installed with the package manager.

To install gendef use:

 pacman -S mingw-w64-{i686,x86_64}-tools

To install mingw32-make.exe use:

  pacman -S mingw-w64-{i686,x86_64}-make

To install both of the at once you can use:

  pacman -S mingw-w64-{i686,x86_64}-{tools,make}

Note that it's often better to use 'make.exe' which is included with
all rtools installations instead of mingw32-make.exe.

These changes were a result of switching to an msys2 based toolchain.
The default rtools40 installer only includes the things needed to
build CRAN packages or base-R. Extra stuff such as system libraries,
debuggers, cmake, etc, are all optionally available via the package
manager.

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


Re: [R-pkg-devel] CensSpatial package error.

2020-05-12 Thread Maëlle SALMON via R-package-devel
I just wanted to add that 

 is an interesting read on the topic. :-)



Den lördag 2 maj 2020 18:27:29 CEST, Max Turgeon  
skrev: 





Hi Jos�,

The error message is pretty clear:

Error in if (class(V.inv) == "try-error") return(Inf) :
  the condition has length > 1

Instead of testing for equality of the class, you should use the function 
"inherits". Then, even if "class(V.inv)" has length greater than one, your 
condition in the if clause will be exactly TRUE or FALSE.

Best,

Max Turgeon

On May 2, 2020 10:07 AM, Jos� Alejandro Ordo�ez 
 wrote:

Caution: This message was sent from outside the University of Manitoba.


Good evening,

My name is Jose and I'm the mantainer of the CensSpatial package. This
package was available as public but it was discharged because a problem
with the geoR orphan package.
That situation was solved and now I'm trying to resubmit the package. The
problem is that when I try to submit it, it does not pass the automatic
incoming checks,* even when I tested it using the function check available
in R studio without errors.*
Apparently is a problem with the OS Linux and Debian but I couldn't
identify it yet. I also tested it using the package rhub and ran
CensSpatial with different OS without results.

I'm provinding below the link to the source package and the error messages,
hoping to get some help from you.

https://www.dropbox.com/sh/gp5iwubkgbv9r8s/AADvJg-GGHKzoMU_PHNWdcYea?dl=0



In the link below, I cannot recognize what the error is. SOS!

https://win-builder.r-project.org/incoming_pretest/CensSpatial_2.5_20200428_224633/Debian/00check.log



Thanks for the attention.


Att,
Jos� Alejandro Ordo�ez.
Ph.D Student
UNICAMP.



Libre
de virus. www.avast.com

<#m_2258293037509368237_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

        [[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

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


Re: [R-pkg-devel] Documenting raw data

2020-05-12 Thread Maëlle SALMON via R-package-devel
Hello,

I don't think you have to (and shouldn't?) document raw data. However, you can 
use it in examples/tests/etc. using the system.file() command you mention.

But maybe you want to export the data? In that case it should be under data/.

This chapter of the R packages book might be useful 
 (as well as 
).

Maëlle.


Den torsdag 23 april 2020 23:06:26 CEST, Cantin, Alan (NRCan/RNCan) 
 skrev: 





Hi Folks,

Looking for some help documenting my raw data (data in inst/extdata).

Is the correct doctype "data"?

The usage of loading this type of data is system.file("extdata", nameoffile, 
package="nameofpackage")

Is this the correct string to put in the \usage section?  I have tried this, 
but get errors such as:

Functions or methods with usage in documentation object 'nameoffile' but not in 
code:
    'system.file'


Has anyone done this recently and have an example to see where I'm going wrong?

This check seems to be new as in the past I simply had lazydata set to true and 
it passed tests.

Thanks for any help.

Cheers,

Alan Cantin



    [[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] Documenting raw data

2020-05-12 Thread Cantin, Alan (NRCan/RNCan)
Hello,

Yes thanks, I was able to figure out that I can (and should) remove 
documentation for these files. This solved my issue and thank you for taking 
the time to respond.

Cheers,


Alan Cantin



 Original message 
From: Ma�lle SALMON 
Date: 2020-05-12 4:24 a.m. (GMT-05:00)
To: r-package-devel@r-project.org, "Cantin, Alan (NRCan/RNCan)" 

Subject: Re: [R-pkg-devel] Documenting raw data

Hello,

I don't think you have to (and shouldn't?) document raw data. However, you can 
use it in examples/tests/etc. using the system.file() command you mention.

But maybe you want to export the data? In that case it should be under data/.

This chapter of the R packages book might be useful 
 (as well as 
).

Ma�lle.


Den torsdag 23 april 2020 23:06:26 CEST, Cantin, Alan (NRCan/RNCan) 
 skrev:





Hi Folks,

Looking for some help documenting my raw data (data in inst/extdata).

Is the correct doctype "data"?

The usage of loading this type of data is system.file("extdata", nameoffile, 
package="nameofpackage")

Is this the correct string to put in the \usage section?  I have tried this, 
but get errors such as:

Functions or methods with usage in documentation object 'nameoffile' but not in 
code:
'system.file'


Has anyone done this recently and have an example to see where I'm going wrong?

This check seems to be new as in the past I simply had lazydata set to true and 
it passed tests.

Thanks for any help.

Cheers,

Alan Cantin



[[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] [BULK] Re: [Rd] "not a valid win32 application" with rtools40-x86_65.exe on Windows 10

2020-05-12 Thread Uwe Ligges
Spencer, I guess you have 64 bit components on the path before the new 
toolchain is found.


Also  check at first if you can load rJava both under 32-bit RGui and 
64-bit RGui.


If this does not help: Can you send me privately the full output (i.e. 
including check.log and also install.out file)?


Best,
Uwe






On 12.05.2020 08:55, Spencer Graves wrote:

Hi, Simon et al.


[changing to "R-package-devel, because I've heard complaints that this 
may not be appropriate for R-devel.]



   I'm still having problems.  I found that I had Java twice in the 
path and deleted both versions (~\AdoptOpenJDK\jdk-11.0.6.10-hotspot\bin 
and ~Java\jre1.8.0_241). That seemed not to change anything as far as I 
can tell.



   I have both directories for both "~Rtools" and "~rtools40", and 
the path includes "~rtools40\bin".  When running R4.0.0 within RStudio, 
"install.package('rJava', type='source', INSTALL_opts = 
'--merge-multiarch') complained, "WARNING:  Rtools is required ... but 
no version compatible ... was found.  Note that the following 
incompatible versions(s) ... were found:  - Rtools 3.5".  When I run r 
in a CMD prompt, I don't get that warning.  However, both complain,



   warning in system("sh ./configure.win") : 'sh' not found


   When I tried "install.packages('rJava')", it seemed to work OK 
(though I still got the complaint from R within RStudio that it could 
not find rtools40).



   And my primary problem is unchanged:  "R CMD check 
Ecfun_0.2-4.tar.gz" ends with the following:



Error:  package or namespace load failed for 'Ecfun':
   .onLoad failed in loadNamespace() for 'rJava', details
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error:  unable to load shared object 'c:/Program
Files/R/R-4.0.0/library/rJava/libs/i386/rJava.dll':
    LoadLibrary failure: ^1 is not a valid win32 application


   The same package on my Mac quits with a LaTeX error I have yet to 
figure out how to fix.



   Suggestions?
   Thanks,
   Spencer Graves


00install.out:


* installing *source* package 'Ecfun' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'Ecfun':
  .onLoad failed in loadNamespace() for 'rJava', details:
   call: inDL(x, as.logical(local), as.logical(now), ...)
   error: unable to load shared object 'C:/Program 
Files/R/R-4.0.0/library/rJava/libs/i386/rJava.dll':

   LoadLibrary failure:  %1 is not a valid Win32 application.

Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/spenc/Documents/R/Ecfun/Ecfun.Rcheck/Ecfun'


On 2020-05-02 02:20, Simon Urbanek wrote:

Spencer,

you shouldn't have anything on the PATH, the location of Java is taken 
from the registry so you only need t have a valid installation of 
Java. Better don't set PATH or JAVA_HOME as it will stop rJava from 
working if you get it wrong. The errors on Windows are confusing, the 
actual error is shown via GUI as pop-up, what they report in the 
console is not the real error.


Re installation from source - it sooks like you either don't have 
Rtools40 or you didn't set PATH properly. If I recall the new Rtools40 
no longer set the PATH (for whatever reason) so you have to do it by 
hand and the instructions it gives you are not working for the command 
shell.


Cheers,
Simon



On 1/05/2020, at 4:51 PM, Spencer Graves 
 wrote:


Hi, Jeroen et al.:


On 2020-04-30 03:15, Jeroen Ooms wrote:

On Thu, Apr 30, 2020 at 6:38 AM Spencer Graves
 wrote:

Hello, All:


    "00install.out" from "R CMD check Ecfun_0.2-4.tar.gz" 
includes:



Error:  package or namespace load failed for 'Ecfun':
   .onLoad failed in loadNamespace() for 'rJava', details
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error:  unable to load shared object 'c:/Program
Files/R/R-4.0.0/library/rJava/libs/i386/rJava.dll':
    LoadLibrary failure: ^1 is not a valid win32 application


This is an error in loading the rJava package, so it is not related to
rtools40, and probably inappropriate for this mailing list.

As Simon suggested, you may have to install the 32-bit Java JDK. See
also this faq: 
https://github.com/r-windows/docs/blob/master/faq.md#how-to-install-rjava-on-windows 



   In fact I had both 32- and 64-bit Java installed but only the 
64-bit was in the path.  I added the 32-bit, but that did not fix the 
problem.  The last 2.5 lines in the section "How to install rJava on 
Windows?" to which you referred me reads:



to build rJava from source, you need the --merge-multiarch flag:

install.packages('rJava', type = 'source', 
INSTALL_opts='--merge-multiarch')



   When I tried that, I got:


Warning in system("sh ./configure.win") : 'sh' not found

[R-pkg-devel] clang11 CRAN check and use of Eigen

2020-05-12 Thread Chris Paciorek
As of some point recently (at least since January) our package
(nimble) is being flagged by CRAN's clang11 check. The check reports
various errors when compiling one of our C++ files that makes use of
code from the Eigen C++ package, which we include with our package.
Here's the report from CRAN:
https://www.stats.ox.ac.uk/pub/bdr/clang11/nimble.log

Similar errors are occurring for a few other packages on CRAN (some
that directly include Eigen and others that do so via RcppEigen).

1) Does anyone happen to know why this problem with Eigen is occurring
with clang11?

2) Given clang11 is not yet released, perhaps CRAN is simply flagging
this for the future. I'm hoping we can still release our next version
without addressing this, and I see that some of the other packages
this affects have released recently (e.g., prophet) seemingly without
addressing the issue. Does anyone know CRAN's policy in this regard?

thanks,
-Chris

Adjunct Professor, Statistical Computing Consultant
Department of Statistics
UC Berkeley

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


Re: [R-pkg-devel] clang11 CRAN check and use of Eigen

2020-05-12 Thread Steven Scott
The errors are all around std::ostream.  My guess is that Eigen is missing
an #include.  The missing include was probably included transitively in
earlier versions of clang, but clang11 cleaned up some files that didn't
need that include themselves, and the downstream file got broken as a
result.

On Tue, May 12, 2020 at 6:51 PM Chris Paciorek 
wrote:

> As of some point recently (at least since January) our package
> (nimble) is being flagged by CRAN's clang11 check. The check reports
> various errors when compiling one of our C++ files that makes use of
> code from the Eigen C++ package, which we include with our package.
> Here's the report from CRAN:
> https://www.stats.ox.ac.uk/pub/bdr/clang11/nimble.log
>
> Similar errors are occurring for a few other packages on CRAN (some
> that directly include Eigen and others that do so via RcppEigen).
>
> 1) Does anyone happen to know why this problem with Eigen is occurring
> with clang11?
>
> 2) Given clang11 is not yet released, perhaps CRAN is simply flagging
> this for the future. I'm hoping we can still release our next version
> without addressing this, and I see that some of the other packages
> this affects have released recently (e.g., prophet) seemingly without
> addressing the issue. Does anyone know CRAN's policy in this regard?
>
> thanks,
> -Chris
>
> Adjunct Professor, Statistical Computing Consultant
> Department of Statistics
> UC Berkeley
>
> __
> 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


[R-pkg-devel] MathJax for Rd files

2020-05-12 Thread Tiago Olivoto
Dear all,

I'm not sure if this is the correct place to make this question, but here I
am.

I'm trying to use MathJax for html help files in my package metan
(https://cran.r-project.org/package=metan)

I have success with the following approach:

 

Including the following call

 

#'\if{html}{\out{

#'https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-chtml-full.js";>

#'  

#'}} 

 

And then typing the equations I need. A simple example bellow

 

#' \ifelse{html}{\out{\[\sqrt{a^2}\]}}{\deqn{\sqrt{a^2}}}

 

Is there any way to put "tex-chtml-full.js" locally so that everyone that
has my package installed see the equations rendered properly even offline?

Thanks in advance

Olivoto

 


[[alternative HTML version deleted]]

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