R CVXR matrix multiplication %*% Error in mul_dims_promote(lh_dim, rh_dim) : Incompatible dimensions
问题 Hello I am trying to run the example from here: http://rtutorial.altervista.org/lp_solvers.html A snippet and test where it goes wrong: library(CVXR) #create Variable objects that can be manipulated by the solver. x<-Variable(3) #coefficients for objective function C<-c(2,4,3) #problem: C %*% x Error: Error in mul_dims_promote(lh_dim, rh_dim) : Incompatible dimensions > x [1] "Variable((3, 1), nonneg=FALSE, nonpos=FALSE, pos=FALSE, neg=FALSE, complex=FALSE, imag=FALSE, symmetric=FALSE, diag