Re: [R-pkg-devel] win-builder 3.3.3 libcurl error + NOTE

2018-03-24 Thread peter dalgaard
Given that R-oldrelease will become 3.4.4 when we branch for 3.5.0 on Monday, 
perhaps you could just wait it out?

-pd

> On 23 Mar 2018, at 17:59 , Tyler  wrote:
> 
> I am getting a NOTE only on R-oldrelease when checking my package on
> win-builder:
> 
> * checking CRAN incoming feasibility ... NOTE
> Maintainer: 'Tyler Morgan-Wall '
> 
> Found the following (possibly) invalid URLs:
>  URL: http://github.com/tylermorganwall/skpr
>From: DESCRIPTION
>Status: Error
>Message: libcurl error code 35
>   error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> protocol version
>  URL: http://github.com/tylermorganwall/skpr/issues
>From: DESCRIPTION
>Status: Error
>Message: libcurl error code 35
>   error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> protocol version
> 
> I checked the version of the package currently on the CRAN that passed
> without any libcurl errors or NOTEs back in January, and it too displayed
> this NOTE, which again only occurred on R-oldrelease. Is there a way to
> prevent this or should I just mention this NOTE in my CRAN submission
> comment?
> 
> Tyler
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

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


Re: [R-pkg-devel] win-builder 3.3.3 libcurl error + NOTE

2018-03-24 Thread peter dalgaard
Sorry, I forgot: We don't switch until _release_ of 3.5.0, four weeks further 
down the line. Still, it doesn't seem worth it making much of a fuss about 
3.3.3.

-pd

> On 24 Mar 2018, at 10:10 , peter dalgaard  wrote:
> 
> Given that R-oldrelease will become 3.4.4 when we branch for 3.5.0 on Monday, 
> perhaps you could just wait it out?
> 
> -pd
> 
>> On 23 Mar 2018, at 17:59 , Tyler  wrote:
>> 
>> I am getting a NOTE only on R-oldrelease when checking my package on
>> win-builder:
>> 
>> * checking CRAN incoming feasibility ... NOTE
>> Maintainer: 'Tyler Morgan-Wall '
>> 
>> Found the following (possibly) invalid URLs:
>> URL: http://github.com/tylermorganwall/skpr
>>   From: DESCRIPTION
>>   Status: Error
>>   Message: libcurl error code 35
>>  error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
>> protocol version
>> URL: http://github.com/tylermorganwall/skpr/issues
>>   From: DESCRIPTION
>>   Status: Error
>>   Message: libcurl error code 35
>>  error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
>> protocol version
>> 
>> I checked the version of the package currently on the CRAN that passed
>> without any libcurl errors or NOTEs back in January, and it too displayed
>> this NOTE, which again only occurred on R-oldrelease. Is there a way to
>> prevent this or should I just mention this NOTE in my CRAN submission
>> comment?
>> 
>> Tyler
>> 
>>  [[alternative HTML version deleted]]
>> 
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

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


Re: [R-pkg-devel] win-builder 3.3.3 libcurl error + NOTE

2018-03-24 Thread Tyler
This is more likely an issue with the win-builder server than an issue with
3.3.3, as I uploaded a prior version of my package that previously (in
January) had a clean check and it returned the same NOTE. I believe this
error stems from GitHub discontinuing support on Feb 22nd for the
cryptographically weak TLS 1.0 & 1.1 protocols and only supporting
connections with the TLS 1.2 protocol.

https://githubengineering.com/crypto-removal-notice/

This could probably be fixed with upgrading/updating the SSL software on
the win-builder server (to whatever version the 3.4.4 and 3.5.0 servers
have).

On Sat, Mar 24, 2018 at 5:21 AM, peter dalgaard  wrote:

> Sorry, I forgot: We don't switch until _release_ of 3.5.0, four weeks
> further down the line. Still, it doesn't seem worth it making much of a
> fuss about 3.3.3.
>
> -pd
>
> > On 24 Mar 2018, at 10:10 , peter dalgaard  wrote:
> >
> > Given that R-oldrelease will become 3.4.4 when we branch for 3.5.0 on
> Monday, perhaps you could just wait it out?
> >
> > -pd
> >
> >> On 23 Mar 2018, at 17:59 , Tyler  wrote:
> >>
> >> I am getting a NOTE only on R-oldrelease when checking my package on
> >> win-builder:
> >>
> >> * checking CRAN incoming feasibility ... NOTE
> >> Maintainer: 'Tyler Morgan-Wall '
> >>
> >> Found the following (possibly) invalid URLs:
> >> URL: http://github.com/tylermorganwall/skpr
> >>   From: DESCRIPTION
> >>   Status: Error
> >>   Message: libcurl error code 35
> >>  error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> >> protocol version
> >> URL: http://github.com/tylermorganwall/skpr/issues
> >>   From: DESCRIPTION
> >>   Status: Error
> >>   Message: libcurl error code 35
> >>  error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> >> protocol version
> >>
> >> I checked the version of the package currently on the CRAN that passed
> >> without any libcurl errors or NOTEs back in January, and it too
> displayed
> >> this NOTE, which again only occurred on R-oldrelease. Is there a way to
> >> prevent this or should I just mention this NOTE in my CRAN submission
> >> comment?
> >>
> >> Tyler
> >>
> >>  [[alternative HTML version deleted]]
> >>
> >> __
> >> R-package-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> > --
> > Peter Dalgaard, Professor,
> > Center for Statistics, Copenhagen Business School
> > Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> > Phone: (+45)38153501
> > Office: A 4.23
> > Email: pd@cbs.dk  Priv: pda...@gmail.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
>
>
>
>
>
>
>
>
>

[[alternative HTML version deleted]]

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


[R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread Wenchao Ma

Dear all,

I just submitted a package to CRAN. It went well on my computer and 
winbuilder, but produced warning and error messages on some linux and 
solaris systems, as shown here: 
https://cran.r-project.org/web/checks/check_results_GDINA.html


Does anyone know what is going on here?

Thanks a lot,
Wenchao

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


Re: [R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread Duncan Murdoch

On 24/03/2018 9:28 AM, Wenchao Ma wrote:

Dear all,

I just submitted a package to CRAN. It went well on my computer and
winbuilder, but produced warning and error messages on some linux and
solaris systems, as shown here:
https://cran.r-project.org/web/checks/check_results_GDINA.html

Does anyone know what is going on here?


The compilers on those systems are set up to be more sensitive to coding 
problems than yours.


The Solaris error comes from your code

 arma::umat B = arma::ones(K,pow(2,K)-K-1);

The library you're using has no function definition for pow() that takes 
2 integers.  If a float or double result is okay, you could use pow(2.0, 
K).  If you really need an int in that argument, you'll need to typecast 
or write your own pow() function.


The Fedora warning seems self explanatory:

Mstep.cpp:62:69: warning: explicitly assigning value of variable of type 
'int' to itself [-Wself-assign]


Take a look at that line (and the other similar ones) and see why the 
compiler thinks you've got something like


i = i;

in your code.

Duncan Murdoch

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


Re: [R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread Wenchao Ma

Dear Duncan,

Thank you. I really appreciate your help!

Yes, the Fedora warning is self explanatory, but I'm still quite 
confused. Below are part of my Mstep.cpp file (both functions are in the 
same file). The fedora warned me that, among others,
Mstep.cpp:62:69: warning: explicitly assigning value of variable of type 
'int' to itself [-Wself-assign]
arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc = 
linkfunc, boundary = boundary, eps = eps);
    ^ 



So, basically, I called Calc_Pj function from Calc_Pj_jac function, but 
not sure why this is not allowed.




// [[Rcpp::depends(RcppArmadillo)]]
#include 
using namespace Rcpp;
using namespace arma;
// [[Rcpp::export]]
arma::vec Calc_Pj(const arma::vec  par, const arma::mat  designMj,
const int & linkfunc,int boundary = 0,const double  eps = 1e-16){
  arma::vec Pj;
  if(linkfunc==1){ //identity
Pj = designMj*par;
  }else if(linkfunc==2){//logit
Pj = exp(designMj*par)/(1 + exp(designMj*par));
  }else if(linkfunc==3){//log
Pj = exp(designMj*par);
  }
  if(boundary==1){
Pj.elem(find(Pj1-eps)).fill(1-eps);
  }
  return Pj;
}

// [[Rcpp::export]]
arma::mat Calc_Pj_jac(arma::vec  par,
  arma::mat designMj,
  int & linkfunc,
  int boundary = 0,
  double eps = 1e-16){
  arma::mat ret = designMj;
  if(linkfunc>1){
arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc = 
linkfunc, boundary = boundary, eps = eps);

if(linkfunc==2){//logit
  ret.each_col() %= Pj%(1-Pj);
}else if(linkfunc==3){//log
  ret.each_col() %= Pj;
}
  }
  return ret;
}

On 3/24/2018 6:18 PM, Duncan Murdoch wrote:

On 24/03/2018 9:28 AM, Wenchao Ma wrote:

Dear all,

I just submitted a package to CRAN. It went well on my computer and
winbuilder, but produced warning and error messages on some linux and
solaris systems, as shown here:
https://cran.r-project.org/web/checks/check_results_GDINA.html

Does anyone know what is going on here?


The compilers on those systems are set up to be more sensitive to coding 
problems than yours.


The Solaris error comes from your code

  arma::umat B = arma::ones(K,pow(2,K)-K-1);

The library you're using has no function definition for pow() that takes 
2 integers.  If a float or double result is okay, you could use pow(2.0, 
K).  If you really need an int in that argument, you'll need to typecast 
or write your own pow() function.


The Fedora warning seems self explanatory:

Mstep.cpp:62:69: warning: explicitly assigning value of variable of type 
'int' to itself [-Wself-assign]


Take a look at that line (and the other similar ones) and see why the 
compiler thinks you've got something like


i = i;

in your code.

Duncan Murdoch


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


Re: [R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread Joshua Ulrich
On Sat, Mar 24, 2018 at 6:42 PM, Wenchao Ma  wrote:
> Dear Duncan,
>
> Thank you. I really appreciate your help!
>
> Yes, the Fedora warning is self explanatory, but I'm still quite confused.
> Below are part of my Mstep.cpp file (both functions are in the same file).
> The fedora warned me that, among others,
> Mstep.cpp:62:69: warning: explicitly assigning value of variable of type
> 'int' to itself [-Wself-assign]
> arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc =
> linkfunc, boundary = boundary, eps = eps);
> ^
> 
>
> So, basically, I called Calc_Pj function from Calc_Pj_jac function, but not
> sure why this is not allowed.
>
The compiler isn't complaining about the function call. It's warning
about all the assignments you make in the function call.

Like Duncan said, the compiler thinks you have something like "i = i"
in your code.  Which you do, for every argument to the function.

You seem to confuse calling functions in R with calling functions in
C++.  C++ function arguments do not have names. They are matched by
position.  Note that none of the other function calls in the file use
"named arguments".

> 
>
> // [[Rcpp::depends(RcppArmadillo)]]
> #include 
> using namespace Rcpp;
> using namespace arma;
> // [[Rcpp::export]]
> arma::vec Calc_Pj(const arma::vec  par, const arma::mat  designMj,
> const int & linkfunc,int boundary = 0,const double  eps = 1e-16){
>   arma::vec Pj;
>   if(linkfunc==1){ //identity
> Pj = designMj*par;
>   }else if(linkfunc==2){//logit
> Pj = exp(designMj*par)/(1 + exp(designMj*par));
>   }else if(linkfunc==3){//log
> Pj = exp(designMj*par);
>   }
>   if(boundary==1){
> Pj.elem(find(Pj Pj.elem(find(Pj>1-eps)).fill(1-eps);
>   }
>   return Pj;
> }
>
> // [[Rcpp::export]]
> arma::mat Calc_Pj_jac(arma::vec  par,
>   arma::mat designMj,
>   int & linkfunc,
>   int boundary = 0,
>   double eps = 1e-16){
>   arma::mat ret = designMj;
>   if(linkfunc>1){
> arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc =
> linkfunc, boundary = boundary, eps = eps);
> if(linkfunc==2){//logit
>   ret.each_col() %= Pj%(1-Pj);
> }else if(linkfunc==3){//log
>   ret.each_col() %= Pj;
> }
>   }
>   return ret;
>
> }
>
> On 3/24/2018 6:18 PM, Duncan Murdoch wrote:
>>
>> On 24/03/2018 9:28 AM, Wenchao Ma wrote:
>>>
>>> Dear all,
>>>
>>> I just submitted a package to CRAN. It went well on my computer and
>>> winbuilder, but produced warning and error messages on some linux and
>>> solaris systems, as shown here:
>>> https://cran.r-project.org/web/checks/check_results_GDINA.html
>>>
>>> Does anyone know what is going on here?
>>
>>
>> The compilers on those systems are set up to be more sensitive to coding
>> problems than yours.
>>
>> The Solaris error comes from your code
>>
>>   arma::umat B = arma::ones(K,pow(2,K)-K-1);
>>
>> The library you're using has no function definition for pow() that takes 2
>> integers.  If a float or double result is okay, you could use pow(2.0, K).
>> If you really need an int in that argument, you'll need to typecast or write
>> your own pow() function.
>>
>> The Fedora warning seems self explanatory:
>>
>> Mstep.cpp:62:69: warning: explicitly assigning value of variable of type
>> 'int' to itself [-Wself-assign]
>>
>> Take a look at that line (and the other similar ones) and see why the
>> compiler thinks you've got something like
>>
>> i = i;
>>
>> in your code.
>>
>> Duncan Murdoch
>
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2018 | www.rinfinance.com

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


Re: [R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread peter dalgaard


> On 25 Mar 2018, at 00:42 , Wenchao Ma  wrote:
> 
>arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc = 
> linkfunc, boundary = boundary, eps = eps);

I was never any good at C++, but that syntax looks like R code. Does C++ allow 
tag=value argument specification? Aren't all the subexpressions of type "par = 
par" just assignments??

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

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


Re: [R-pkg-devel] Warnings and error message in CRAN Package Check Results

2018-03-24 Thread Wenchao Ma

Hi Joshua and Peter,

Thank you so much for your help. Yes, it's definitely my mistake in 
mixing R and c++ function calls...


I think I can fix the problems now.

Thank you once again,
Wenchao

On 3/24/2018 7:31 PM, peter dalgaard wrote:




On 25 Mar 2018, at 00:42 , Wenchao Ma  wrote:

arma::vec Pj = Calc_Pj(par = par, designMj = designMj, linkfunc = linkfunc, 
boundary = boundary, eps = eps);


I was never any good at C++, but that syntax looks like R code. Does C++ allow tag=value 
argument specification? Aren't all the subexpressions of type "par = par" just 
assignments??



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