Re: [R-pkg-devel] Suggesting gurobi

2021-06-04 Thread Balasubramanian Narasimhan
Suggests" would trigger an attempt to install gurobi, which is not on CRAN. We used "Enhances" for our CVXR  because (1) None of the functionality in the package requires gurobi; (2) Packages in "Enhances" are not required to check the package by CRAN. Your package mirrors ours in these

[R-pkg-devel] Suggesting gurobi

2021-06-04 Thread Noah Greifer
Hello, I have been working on adding an option for my users to use integer programming (a method of optimization) to enhance the results of a function in my package. There are several R packages on CRAN that perform integer programming, including Rglpk and Rsymphony. However, there is a

Re: [R-pkg-devel] Suggesting gurobi

2021-06-04 Thread Dirk Eddelbuettel
On 4 June 2021 at 16:21, Balasubramanian Narasimhan wrote: | Suggests" would trigger an attempt to install gurobi, which is not on CRAN. To my understanding that is not the case. It would only do so if and when install.packages() is asked to also install packages in Suggests:. And point of

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Max Turgeon
I apologize for the wrong link below; as described here: https://cran.r-project.org/doc/manuals/r-devel/NEWS.html Max Turgeon Assistant Professor Department of Statistics Department of Computer Science University of Manitoba

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
That log file includes the line using R Under development (unstable) (2021-05-30 r80413) and later says The error most likely occurred in: > ### Name: path_coeff > ### Title: Path coefficients with minimal multicollinearity > ### Aliases: path_coeff path_coeff_mat > > ### ** Examples > > ##

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
The offending line in path_coeff seems to be betas[i, 2:nvar] <- t(solve_svd(cor.x2, cor.y)) where i is a single integer, nvar is 15, and the right hand side is a 14 by 14 matrix. What is this line trying to do? Did it ever give the correct result? -Bill On Fri, Jun 4, 2021 at 7:39 AM Bill

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Tiago Olivoto
Thanks, Bill and Max for your suggestions. I was using R 4.1.0. After updating to R-devel I was able to reproduce the error, which was just fixed by using solve() instead solve_svd() in the line suggested by Bill. Best regards, Tiago Em sex., 4 de jun. de 2021 às 12:41, Bill Dunlap escreveu: >

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Bill Dunlap
solve_svd's second argument is 'tolerance', a small scalar value, not the right hand side of X %*% beta == Y. It returns the [approximate] inverse of X, not beta. solve_svd(cor.x2,cor.y) should probably be solve_svd(cor.x2)%*%cor.y (or just solve(cor.x2,cor.y)). -Bill On Fri, Jun 4, 2021 at

Re: [R-pkg-devel] [Error] data length differs from size of matrix

2021-06-04 Thread Tiago Olivoto
Exactly Bill! I'll implement your suggestion (solve_svd(cor.x2)%*%cor.y), to return betas. Best! Tiago Em sex., 4 de jun. de 2021 às 15:12, Bill Dunlap escreveu: > solve_svd's second argument is 'tolerance', a small scalar value, not the > right hand side of X %*% beta == Y. It returns the