similar to: small bug in gl1ce, package lasso2 (PR#8280)

Displaying 20 results from an estimated 2000 matches similar to: "small bug in gl1ce, package lasso2 (PR#8280)"

2024 Feb 06
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
Because functions get called and therefore, the calling sequence matters. It?s just protecting you from yourself, but as someone pointed out, there?s a way to silence such notes. G From: Herv? Pag?s <hpages.on.github at gmail.com> Sent: Tuesday, February 6, 2024 2:40 PM To: Izmirlian, Grant (NIH/NCI) [E] <izmirlig at mail.nih.gov>; Duncan Murdoch <murdoch.duncan at gmail.com>;
2024 Feb 06
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
Here's a dummy example that I think illustrates the problem: toto <- function() { if (runif(1) < 0.5) function(a) a else function(a,b) a+b } > fcn <- toto() > fcn(1,2) [1] 3 > fcn <- toto() > fcn(1,2) [1] 3 > fcn <- toto() > fcn(1,2) Error in fcn(1, 2) : unused argument (2) How can you use the returned function, if you get different arguments?
2024 Feb 06
2
NOTE: multiple local function definitions for ?fun? with different formal arguments
Thanks. Workarounds are interesting but... what's the point of the NOTE in the first place? H. On 2/4/24 09:07, Duncan Murdoch wrote: > On 04/02/2024 10:55 a.m., Izmirlian, Grant (NIH/NCI) [E] via R-devel > wrote: >> Well you can see that yeast is exactly weekday you have.? The way out >> is to just not name the result > > I think something happened to your
2007 Jul 25
1
question on using "gl1ce" from "lasso2" package
Hi, I tried several settings by using the "family=gaussian" in "gl1ce", but none of them works. For the case "glm" can work. Here is the error message I got: > glm(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) > gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) Error in eval(expr, envir,
2024 Feb 04
1
NOTE: multiple local function definitions for ?fun? with different formal arguments
On 04/02/2024 10:55 a.m., Izmirlian, Grant (NIH/NCI) [E] via R-devel wrote: > Well you can see that yeast is exactly weekday you have. The way out is to just not name the result I think something happened to your explanation... > > toto <- function(mode) > { > ifelse(mode == 1, > function(a,b) a*b, > function(u, v, w) (u + v) / w) > } It's
2024 Feb 04
1
NOTE: multiple local function definitions for ?fun? with different formal arguments
Well you can see that yeast is exactly weekday you have. The way out is to just not name the result toto <- function(mode) { ifelse(mode == 1, function(a,b) a*b, function(u, v, w) (u + v) / w) } ________________________________ From: Grant Izmirlian <izmirlidroid at gmail.com> Date: Sun, Feb 4, 2024, 10:44 AM To: "Izmirlian, Grant (NIH/NCI) [E]"
2007 Apr 12
1
LME: internal workings of QR factorization
Hi: I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2010 Jan 26
3
Problem with "nls" function
Dear R users, I have a response variable in a csv file called "y" and a matrix of predictor variables in a csv file called "mat". I have used the function "nls" I have specified the nonlinear relation between these variable.The code I have witten is called Rprog which begins with the phrase: L.minor.m1<-nls(Y~a ....etc.. The program when I execute the program, I
2005 Dec 23
1
can someone help me understand LAM/MPI and Rmpi for use on a cluster
I'm fairly astute at C and R but new to parallelization. Would someone be willing to provide help in the form of a simple example that parallelizes an R function from the inside of a C routine? If so, write me back at izmirlig at mail.nih.gov Thanks!
2007 Nov 09
1
help with lasso2 package
X is a matrix and F is a vector. F2 <- data.frame(cbind(X,F)) F2 V1 V2 V3 F 1 -0.250536332 -1.4755883 1.9580974 -2.136487 2 -0.009856084 0.4953269 0.5486092 -2.744482 3 -0.406962682 0.7729631 0.1861905 -2.891821 4 1.938780097 0.7469251 1.2537781 -1.212992 5 -0.332370358 1.1943637 0.7114278 -1.830441 modF<-formula(F ~ V1 + V2 + V3) #no error message
2007 May 18
0
Cross-validation for logistic regression with lasso2
Hello, I am trying to shrink the coefficients of a logistic regression for a sparse dataset, I am using the lasso (lasso2) and I am trying to determine the shrinkinage factor by cross-validation. I would like please some of the experts here to tell me whether i'm doing it correctly or not. Below is my dataset and the functions I use w= a b c d e P A 0 0 0 0 0 1 879 1 0 0 0 0 1 3 0 1 0 0 0 7 7
2008 Oct 22
2
Help with functions
Hi there, I have a the following function which takes a name(fname), total number of rows (Total), number of times to make a sample(nSample), number of records/rows to be included in each sample(nPatient). then it generates required samples and calculates the mean and standard deviation of the columns for each sample and finally in calculates the grand mean and standard deviation. The problem
2016 Jun 20
2
xxx not available for .C in package yyy
Hi R package developers. This is literally the strangest thing I've ever seen. Latest (as of a month ago) R under cygwin64. I'm teaching an intern package building and using the .C interface. The package compiles, but when it gets to "setting up lazy load" or some such it throws the error "triang" not available for .C() in package "randpkg". Upon checking,
2008 Oct 17
2
function help
Hi everyone, I have dataset which I make a sample of it couple of times and each time I get the mean and standard deviation of each row for each sample. I have a function for that, which takes the name of the file and number of times to sample and then returns the mean and standard deviation for each row in each sample. Sample=function(name, n){
2003 Dec 04
2
predict.gl1ce question
Hi, I'm using gl1ce with family=binomial like so: >yy succ fail [1,] 76 23 [2,] 32 67 [3,] 56 43 ... [24,] 81 18 >xx c1219 c643 X1 0.04545455 0.64274145 X2 0.17723669 0.90392792 ... X24 0.80629054 0.12239320 >test.gl1ce <- gl1ce(yy ~ xx, family = binomial(link=logit), bound = 0.5 ) or >omit <- c(2,3) >test.gl1ce
2012 Mar 27
4
Help on predict.lm
Hello, I'm new here, but will try to be as specific and complete as possible. I'm trying to use “lm“ to first estimate parameter values from a set of calibration measurements, and then later to use those estimates to calculate another set of values with “predict.lm”. First I have a calibration dataset of absorbance values measured from standard solutions with known concentration of
2012 Mar 27
2
lasso constraint
In the package lasso2, there is a Prostate Data. To find coefficients in the prostate cancer example we could impose L1 constraint on the parameters. code is: data(Prostate) p.mean <- apply(Prostate, 5,mean) pros <- sweep(Prostate, 5, p.mean, "-") p.std <- apply(pros, 5, var) pros <- sweep(pros, 5, sqrt(p.std),"/") pros[, "lpsa"] <-
2024 Feb 07
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
I put the idea below into a function that gives nicer looking results. Here's the new code: dupnames <- function(path = ".") { Rfiles <- pkgload:::find_code(path) allnames <- data.frame(names=character(), filename=character(), line = numeric()) result <- NULL for (f in Rfiles) { exprs <- parse(f, keep.source = TRUE) locs <-
2004 Sep 22
1
Sample without replacement
Hello, I have a simple problem (checked the archives and the appropriate help pages, to no avail). I want to creat a vector that is length(2000). The vector is to consist of two strings( "std" and "dev") with 1760 "std"s and 240 "dev"s. Furthermore, for each element of the vector, i want the selection of one of the strings to be approx. random. The
2010 Aug 17
2
AIC in MuMIn
Hello, I am using package MuMIn to calculate AIC for a full model with 10 explanatory variables. Thanks in advance in sharing your experience. Q1 In the AIC list of all models, each model is differentiated by model number. Please kindly advise if it is possible to find the corresponding explanatory variable(s) for the model number. Q2 error message I tried to display sub-model with only