similar to: How to look within .Internal ?

Displaying 20 results from an estimated 1000 matches similar to: "How to look within .Internal ?"

2014 Jul 07
2
a question about optim.R and optim.c in R
Hi, I am learning R by reading R source code. Here is one question I have about the optim function in R. The context : In the optim.R, after all the prep steps, the main function call call is made via : .External2(C_optim, par, fn1, gr1, method, con, lower, upper). So, it seems to me, to follow what is going on from here, that I should read the optim function in \src\library\stats\src\optim.c
2003 Jul 09
2
.Internal(optim)
> hi all, > I am using optim. I am getting the following error message: > > Error in optim(par = start.vals[, h], fn = post.func.pois, gr = post.grad. > pois, : > L-BFGS-B needs finite values of fn > > If I look at optim typing '> optim' it seems that the error comes from > inside .Internal(optim), so I wonder how can I see the code for .Internal(
2020 Oct 28
2
R optim() function
Hi R-Help, I am using R to do functional outlier detection (using PCA to reduce to 2 dimensions - the functional boxplot methodology used in the Rainbow package), and using Hscv.diag function to calculate the bandwidth matrix where this line of code is run: result <- optim(diag(Hstart), scv.mat.temp, method = "Nelder-Mead", control = list(trace = as.numeric(verbose))) Within the
2005 Apr 20
2
how to get code of a .Internal() function?
Hello, I'm working with the function optim() from stats package, and inside this function is called the function .Internal(optim(....)) and I want to get the code of this function which would help me to understand why the Nelder-Mead algorithm doesn't converge with my data. I'm working under Windows XP. Could you reply to this adress because I don't belong to the mailing list
2003 Jan 17
1
Arguments of R- and C-side of internal functions
Dear R experts, I looked at the body of, say, `optim' function and found the call to the `.Internal', C optim function. It looks like this: .Internal(optim(par, fn1, gr1, method, con, lower, upper)) On the other hand, the C prototype of optim is: SEXP do_optim(SEXP call, SEXP op, SEXP args, SEXP rho); So, I guess that all the list of parameters passing in R are assigned to
2011 Mar 18
1
[Patch suggestion] Adding 3rd arg to tempfile() to set extension
The other day I was working on an example which used tempfile() to create file for use by the graphics device. And while I love tempfile()---as it is portable and clever and the files get cleaned by R and all that---I noticed one missing feature I would like to see: beside a starting name pattern, and an optional directory, an 'file extension' argument would be nice to have. As e.g. in
2006 Jan 17
1
how can i locate the source code of a module quickly?
I have dowloaded the Source Code of R,and I want to know the process of chi-sqared test,but how can I found it? [[alternative HTML version deleted]]
2010 Oct 13
2
How to fix error in the package 'rgenoud'
Dear R user fellows, I would like to ask you about the package 'rgenoud' which is a genetic optimization tool. I ran the function 'genoud' with two variables to be minimized by the following command. result<-genoud(fn,nvars=2,starting.values=c(0.5,0), pop.size=1000, max.generations=10, wait.generations=3) Then, I had the following error message. Error in
2004 Jul 02
2
hclust
im using plclust and want the labels to be different colors. i took a look at getS3method("plot","hclust") and saw a call to .Internal. i looked at the help on .Internal and dont know where to go next. any help appreciated! thanks, rafael
2004 Jun 22
0
[LLVMdev] Linearscan allocator bug?
On Tue, 22 Jun 2004, Vladimir Prus wrote: > First, I attach two files -- LLVM asm and the asm for my target. The problem > with assembler is: on line 171 it uses register gr2, which is copied from gr6 > above, on line 161. The only predecessor of this basic block is jump on line > 90. The problem is that gr6 is not initialized in the interval from the > function entry till the
2004 Jun 22
3
[LLVMdev] Linearscan allocator bug?
Folks, I'm running into something which looks like a bug in linearscan allocator. Of course I can't be 100% sure it's not some unobvious mistake on my part, so I'd like to hear your opinion. First, I attach two files -- LLVM asm and the asm for my target. The problem with assembler is: on line 171 it uses register gr2, which is copied from gr6 above, on line 161. The only
2003 Oct 22
1
Windows RConsole Focus
Hi, I was looking for a Windows-specific R function to focus the console window and couldn't find one. The motivation is that after loading the tcltk package, the "main" Tk window "." is presumably focused but then immediately withdrawn (hidden) so the RConsole loses its focus and you have to click on it to continue typing. Would there be any interest in including a
2015 Sep 17
1
names treatment in optim()
Dear both, I have found that names are not treated in the same way in optim() depending on the optimization method (argument method). The example below shows the difference between the Brent method and the L-BFGS-B method. f <- function(x){ y <- x^2;names(y) <-"f(x)";y} optim(10, f, method="Brent", lower=-1, upper=10)$value optim(10, f, method="L-BFGS-B",
2004 Jun 23
3
[LLVMdev] Linearscan allocator bug?
Chris Lattner wrote: > On Tue, 22 Jun 2004, Vladimir Prus wrote: > > First, I attach two files -- LLVM asm and the asm for my target. The > > problem with assembler is: on line 171 it uses register gr2, which is > > copied from gr6 above, on line 161. The only predecessor of this basic > > block is jump on line 90. The problem is that gr6 is not initialized in > >
2011 May 19
3
problem with optim()
Dear R-users, I would like to maximize the function g above which depends on 4 parameters (2 vectors, 1 real number, and 1 matrix) using optim() and BFGS method. Here is my code: # fonction to maximize g=function(x) { x1 = x[1:ncol(X)] x2 = x[(ncol(X)+1)] x3 = matrix(x[(ncol(X)+2):(ncol(X)+1+ncol(X)*ncol(Y))],nrow=ncol(X),ncol=ncol(Y)) x4 = x[(ncol(X)+1+ncol(X)*ncol(Y)+1):length(x)]
2003 Dec 31
2
Calling primitive functions from C code
Does anyone have an example of calling primitive or internal functions from C code that they would share with me? I am having trouble trying to figure out how to construct the proper arguments to pass to "do_subset_dflt" Here is the prototype: SEXP do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho); The R_FunTab from "names.c" gives some additional information on the
2003 Dec 31
2
Calling primitive functions from C code
Does anyone have an example of calling primitive or internal functions from C code that they would share with me? I am having trouble trying to figure out how to construct the proper arguments to pass to "do_subset_dflt" Here is the prototype: SEXP do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho); The R_FunTab from "names.c" gives some additional information on the
2013 Jan 01
1
Behavior or as.environment in function arguments/call (and force() behaviors...)
Happy 2013! Can someone with more knowledge of edge case scoping/eval rules explain what is happening below? Happens in all the versions of R I have on hand. Behavior itself is confusing, but ?as.environment also provides no clue. The term used in that doc is 'search list', which is ambiguous, but the see also section mentions search(), so I would *think* that is what is intended.
2008 Sep 02
2
two lattice graphs in one object
When I create a lattice/Trellis type graph, I typically write a function that returns the graph, as in do.graph <- function(x, y, ...) { require(lattice) return(xyplot(y~x, ...)) } My question today is this: If I want two graphs on one page, one way of achieving it is to print the objects into defined areas, as in gr1 <- xyplot(rnorm(111) ~ runif(111)) gr2 <-
2008 Aug 25
0
[LLVMdev] Proposal : Function Notes
On Aug 22, 2008, at 4:40 PM, Devang Patel wrote: > The LLVM passes are responsible to take appropriate actions based on > Function > Notes associated with function definition. For example, > > define void @fn1() notes("opt-size=1") { ... } > > The function fn1() is being optimized for size without losing > significant > performance. The inliner will