similar to: Error in matrix (unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : attempt to set an attribute on NULL

Displaying 20 results from an estimated 5000 matches similar to: "Error in matrix (unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : attempt to set an attribute on NULL"

2009 Jul 03
1
Error
Dear Sir, I installed successfully using the install.packages("Rdonlp2", repos=" http://R-Forge.R-project.org"). I tried on the example which is defined on the Rdonlp help file ,p <- c(-10,10)par.l <- c(0,0); par.u <- c(100,100)lin.u <- 1; lin.l <- 1A <- t(c(1,1))fn <- function(x){ x[1]^2+x[2]^2}ret <- donlp2(p, fn, par.lower=par.l, par.upper=par.u, A=A,
2012 Jul 18
4
The best solver for non-smooth functions?
# Hi all, # consider the following code (please, run it: # it's fully working and requires just few minutes # to finish): require(CreditMetrics) require(clusterGeneration) install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org", getOption("repos"))) install.packages("Rsolnp2", repos= c("http://R-Forge.R-project.org",
2010 Jul 26
1
Optimization problem with nonlinear constraint
Dear all, I'm looking for a way to solve a simple optimization problem with a nonlinear constraint. An example would be max x s.t. y = x * T ^(x-1) where y and T are known values. optim() and constrOptim() do only allow for box or linear constraints, so I did not succedd here. I also found hints to donlp2 but this does not seem to be available anymore. Any hints are welcome,
2008 Jul 25
3
Maximization under constraits
I''m looking for a R function which can maximise this logliklihood function, under the constraits a>0 e b>0 f<-function(param){ a<-param[1] b <-param[2] log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi ))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)))))} I''ve tried maxlik constrOptim e donlp2 but without success. Thanks so
2009 Jul 03
2
Error using the Rdonlp2‏ Package
Dear experts, I'm attempting to solve a constrained optimization problem using the Rdonlp2 package. I created a Lagrange function (L=f(x)-lambda(g(x)-c)), where x is a vector of 16 parameters. This is what I'm using as objective function in the code below. In addition, I set bounds on these parameters (par.u and par.l). When I run the code, I get the error message shown below. Any idea
2009 Aug 06
0
donlp2
Dear Sir, I am working with one example in R donlp2. How I can get the Hessian matrix from the output. p = c(10,10) par.l = c(-100,-100) par.u = c(100,100) nlin.l = nlin.u = 2 fn = function(x) { x[1]^2+x[2]^2 } dfn = function(x){ c(2*x[1], 2*x[2]) } attr(fn, "gr") = dfn nlcon = function(x){ x[1]*x[2] } dnlcon = function(x){ c(x[2], x[1]) } attr(nlcon, "gr") = dnlcon
2008 Aug 19
1
nonlinear constrained optimization
Hi. I need some advises on how to use R to find pi (i is the index) with the following objective function and constraint: max (sum i)[ f(ai, bi, pi) * g(ci, di, pi) * Di ] s.t. (sum i)[ f(ai, bi, pi) * Di * pi] / (sum i)[ f(ai, bi, pi) * Di ] <= constant f and g are diffentiable. So, I am thinking of optim with method = "BFGS"? But wonder how to include the
2007 Jun 10
0
Rdonlp2 - an extension library for constrained optimization
Ryuichi Tamura wrote: Please can you put your package on the CRAN server ? Many thanks Diethelm Wuertz > Hello R-list, > > I have released an update version (0.3-1) of Rdonlp2. > Some (fatal) bugs which may kill interpreter should be fixed. > > In addition, user-visible changes are: > * *.mes, *.pro files are not created if name=NULL(this is default) in donlp2(). > * use
2024 Apr 27
1
Should c(..., recursive = TRUE) and unlist(x, recursive = TRUE) recurse into expression vectors?
Reading the body of function 'AnswerType' in bind.c, called from 'do_c' and 'do_unlist', I notice that EXPRSXP and VECSXP are handled identically in the recurse = TRUE case. A corollary is that c(recursive = TRUE) and unlist(recursive = TRUE) treat expression vectors like expression(a, b) as lists of symbols and calls. And since they treat symbols and calls as
2011 Oct 31
1
Error in dim(data) <- dim : attempt to set an attribute on NULL.
This post has NOT been accepted by the mailing list yet. Hi, I'm passing the input parameters and calculating the linear regression. some time i'm getting the error Error in dim(data) <- dim : attempt to set an attribute on NULL. But when i restart my R studio, then it runs. Please help to resolve this problem. My code looks like dataset <-
2011 Mar 10
2
ERROR: gamm function (mgcv package). attempt to set an attribute on NULL
Hello:I run a gamm with following call :mode<-gamm(A~B,random=list(ID=~1),family=gaussian,na.action=na.omit,data=rs)an error happened:ERROR names(object$sp) <- names(G$sp) : attempt to set an attribute on NULLwith mgcv version 1.7-3What so? How can I correct the Error? Thanks very much for any help. [[alternative HTML version deleted]]
2009 Feb 12
0
Error Message: Error in dim(data) <- dim : attempt to set an attribute on NULL
I have the following code, from which I get the following error message: Error in dim(data) <- dim : attempt to set an attribute on NULL I think the error is coming from the part of my code in BOLD RED. The script works fine until then. #Load libraries source("http://bioconductor.org/biocLite.R") biocLite() library(limma) library(Biobase) #change directory to folder where
2009 Sep 03
3
Rdonlp2 package question
Previous versions have this question have partially bounced. I apologize if parts of this are showing up multiple times on the list. Another try ... There was at one time an R package called Rdonlp2 for solving constrained nonlinear programming problems. Both the objective function and the constraints could be nonlinear in the decision variables. The package is no longer in the CRAN list.
2023 Sep 23
2
NROW and NCOL on NULL
Dear list, I do not know what would be the 'correct' answer to the following but I think that they should return the same value to avoid potential problems and hard to debug errors. Regards, Simone --------------------------------------- > NCOL(NULL) [1] 1 > NROW(NULL) [1] 0 > sessionInfo() R version 4.3.1 RC (2023-06-08 r84523 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit)
2012 Feb 11
2
obtaining a true/false vector with combination of strsplit, length, unlist,
Hi, A pared down version of the dataset I'm working with: edm<-read.table(textConnection("WELLID X_GRID Y_GRID LAYER ROW COLUMN SPECIES CALCULATED OBSERVED w301_3 4428. 1389 2 6 18 1 3558 6490. w304_12 4836. 6627 2 27 20 1 3509 3228. 02_10_12080 3.6125E+04 13875 1 56 145 1
2008 Feb 19
0
nlsList - Error in !unlist(lapply(coefs, is.null))
Howdee, I am able to fit a 4-parameter logistic growth curve to a dataset which comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the parameters for each individual (i.e., for each 'id') using nlsList, then I obtain an Error message which I have trouble interpreting. Any advice as to how I can solve this problem? Thanks for your time, Marc > reg <-nls(mass ~
2012 Jun 19
1
need help with unlist(), losing NULL values
Hi, I have a very rudimentary kind of question on using unlist(). I am parsing a bunch of JSON text using rjson package. Some data elements in a dictionary happen to be null which rjson parses correctly. > fromJSON(json_str='{"query":{"A":10, "B":null, "C":"hello"}, "query":{"A":20, "B":null,
2011 May 19
1
Feature request: extend functionality of 'unlist()' by args 'delim=c("/", "_", etc.)' and 'keep.special=TRUE/FALSE'
Dear list, I hope this is the right place to post a feature request. If there's exists a more formal channel (e.g. as for bug reports), I'd appreciate a pointer. I work a lot with named nested lists with arbitrary degrees of "nestedness". In order to retrieve the names and/or values of "bottom layer/bottom tier", I love the functionality of 'unlist()', or
2020 Aug 14
0
Bug in stats:::`[.formula`: (~ NULL)[2] gives Error ... missing value where TRUE/FALSE needed
Hi, it looks like: > stats:::`[.formula` function (x, i) { ans <- NextMethod("[") if (length(ans) == 0L || as.character(ans[[1L]])[1L] == "~") { class(ans) <- "formula" environment(ans) <- environment(x) } ans } <bytecode: 0x556688d87cc0> <environment: namespace:stats> doesn't like to extract NULL
2007 Aug 23
1
in cor.test, difference between exact=FALSE and exact=NULL
Pardon my ignorance, but is there a difference in cor.test between exact=FALSE and exact=NULL when method=spearman? Take for example: x<-c(1,2,2,3,4,5) y<-c(1,2,2,10,11,12) cor.test(x,y, method="spearman", exact=NULL) This gives an error message, Warning message: Cannot compute exact p-values with ties in: cor.test.default(x, y, method = "spearman", exact = NULL)