similar to: optim

Displaying 20 results from an estimated 140 matches similar to: "optim"

2005 Sep 13
3
NUMERIC_POINTER question
Dear R-developers, Using .Call I pass a S4 class with e.g. the following class definition: setClass("mmatrix",representation( data="matrix") ) On the "C side" i do mat = GET_SLOT(vs,install("data")); and then: printf("%f\n",NUMERIC_POINTER(mat)[1]); The above print statement produces the correct output if xx<- new("mmatrix")
2005 Sep 28
1
Problem with memory footprint of qq plot generated with lattice
Dear R helpers, I generate a qq plot using the following function call. qqmath(~val|ind,data=xx ,distribution=function(p) qt(p,df=19) ,ylab="Sample Quatinles" ,xlab="Theoretical Quantiles" ,aspect=1 ,prepanel = prepanel.qqmathline ,panel=function(x,y) { panel.qqmathline(y, distribution=function(p) qt(p,df=19),col=2)
2005 Jul 26
1
/ Right division.
Dear R gurus. Is there an R function equivalent to octaves / (Right division) withouth forming the inverse of Y' using solve ? [snip - from octave docu] Right division. This is conceptually equivalent to the expression (inverse (y') * x')' but it is computed without forming the inverse of Y'. If the system is not square, or if the coefficient matrix
2005 Sep 11
1
dyn.load error -- undefined symbol: ...
Dear R-developers, I am working on an C interface to some c functions. I compiled the c file using R CMD SHLIB without any compilation errors. All libs used are added to the LD_LIBRARY_PATH. However dyn.load("interface.so") produces undefined symbol: N_VNew_Serial; which is defined in one of the libs I link against. Where, and how to start searching for the error? Eryk
2005 Sep 26
1
regression methods for circular(?) data.
Dear R-users, I have the following data x <- runif(300,min=1,max=230) y <- x*0.005 + 0.2 y <- y+rnorm(100,mean=0,sd=0.1) y <- y%%1 # <------- modulo operation plot(x,y) and would like to recapture the slope (0.005) and intercept(0.2). I wonder if there are any clever algorithms to do this. I was looking at the function lm.cirucalar. Is this the method to use? If, which of the
2005 Oct 11
1
Error: .First.lib failed for 'SBMLodeSolveR'
Dear R-developers, I am getting the following error message (see bottom of e-mail) and can't make a clue out of it. The zzz.R file contains .First.lib <- function(lib, pkg) library.dynam("SBMLodeSolveR",pkg,lib) .Last.lib <- function(libpath) library.dynam.unload("SBMLodeSolveR", libpath) There is a SBMLodeSolveR.so file in the src directory which works if loaded
2005 Oct 05
1
Problems with autoconf example from r-ext.
Dear R-developers, I am trying to reproduce the autoconf.ac example from R-ext and fail. My autoconf file looks like this [autoconf.ac] # original by Friedrich Leisch, much changed by BDR AC_INIT([SBMLodeSolveR]) dnl Select an optional include path, from a configure option dnl or from an environment variable. AC_ARG_WITH([sbmlode-include],
2009 Jul 11
1
Samba freezes server when writing 50MB MS Word document (sometimes)
Hi list for a couple of days we have the problem that our samba pdc server (ubuntu 8.04 LTS [kernel 2.6.24-24] with 3.0.28a samba package) freezes sometimes when someone saves a specific word document (about 50MB) from MS Word. It's not always the same person. Saving the document - as nearly any huge MS Office document - takes some time, about one minute (guessed). First the server gets
2009 Jul 23
2
Bug in seq() (PR#13849)
Full_Name: Jeremiah Cohen Version: 2.9.0 OS: Windows XP Submission from: (NULL) (129.59.230.235) I believe there is a bug in the seq() function for certain values of the "from" argument. Here are examples: > seq(-.2, .1, .1) [1] -0.2 -0.1 0.0 0.1 > seq(-.3, .1, .1) [1] -3.000000e-01 -2.000000e-01 -1.000000e-01 5.551115e-17 1.000000e-01 > seq(-.4, .1, .1) [1] -0.4 -0.3
2004 Sep 03
6
seq
Hi everyone, I've tried the below on R 1.9.1 and the 2004-08-30 builds of R 1.9.1 Patched and R 2.0.0 on Windows 2000, and the results are consistent. > seq(0.5, 0, by = -0.1) [1] 0.5 0.4 0.3 0.2 0.1 0.0 > seq(0.7, 0, by = -0.1) [1] 7.000000e-01 6.000000e-01 5.000000e-01 4.000000e-01 3.000000e-01 2.000000e-01 1.000000e-01 -1.110223e-16 Is this really the intended behaviour?
2007 Feb 25
1
Writing integers in "write.matrix" function
Hello everyone, I am using the following program to get the p-value of some numbers (column 'LR' of the data.dat file). I want to write the 1st and 2nd column of the output file (data.out) as an integer while the program change them. Could anybody please tell me how I can write the code which writes the values of the first two columns as integer? For your convenience, I have attached the
2011 Aug 16
2
generalized inverse using matinv (Design)
i am trying to use matinv from the Design package to compute the generalized inverse of the normal equations of a 3x3 design via the sweep operator. That is, for the linear model y = ? + x1 + x2 + x1*x2 where x1, x2 are 3-level factors and dummy coding is being used the matrix to be inverted is X'X = 9 3 3 3 3 3 3 1 1 1 1 1 1 1 1 1 3 3 0 0 1 1 1 1 0 0 1 0 0 1 0 0 3 0 3 0 1 1 1 0 1 0 0 1
2009 Sep 08
1
rcorrp.cens and U statistics
I have two alternative Cox models with C-statistics 0.72 and 0.78. My question is if 0.78 is significantly greater than 0.72. I'm using rcorrp.cens. I cannot find the U statistics in the output of the function. This is the output of the help example: > x1 <- rnorm(400) > x2 <- x1 + rnorm(400) > d.time <- rexp(400) + (x1 - min(x1)) > cens <- runif(400,.5,2) > death
2004 Jul 14
1
Running the optimization on the subset of parameters
Dear all, I'd like to find a minimum of (-loglik) function which is a function of k parameters. I'd like to run the minimization algorithm for the different subsets of the parameters and assign the fixed values to the complementary subset. How should I define my (-loglik) function such that it can be passed to the optim or other optimization function? Much thanks for any suggestions.
2012 Jan 24
2
[LLVMdev] Pointer aliasing
Hi Roel, the code you list below is precisely what I expect to get (of course the stores must happen but the constant folding should happen as well). It all looks very strange. LLVM is behaving as if the __restrict__ keyword was not used at all. Even more strange is the fact that for this function: double f(double *__restrict__ x, double *__restrict__ y, double *__restrict__ z) { *x = 1.0;
2010 Aug 12
2
[LLVMdev] Instruction does not dominate all uses?
This has been driving me crazy. In order to JIT stuff in a simple REPL I'm trying to wrap them in anonymous functions and then evaluate them (as per recommendation of the Kaleidoscope guide). With simple expressions it works fine. Like if I try and add 4 and 5, I get this from the bare llvm::Value dump: double 9.000000e+00 and this after it's wrapped in a function: define double @0() {
2012 Jan 23
2
[LLVMdev] Pointer aliasing
Hi LLVMers, I would like to ask a question regarding aliasing. Suppose I have the following program: double f(double** p ) { double a,b,c; double * x = &a; double * y = &b; double * z = &c; *x = 1; *y = *x + 2; *z = *x + 3; return *x+*y+*z; } LLVM can tell that the three pointers do not alias each other so can perform the constant folding at compile time.
2012 Jan 24
2
[LLVMdev] Pointer aliasing
I think the problem here is that the IR doesn't have any way to attach restrict information to loads/stores/pointers. It works on arguments because they can be given the 'noalias' attribute, and then the alias analyzer must understand what that means. Pete On Jan 24, 2012, at 7:47 AM, Roel Jordans wrote: > I have no clue, I didn't have time to look into that example yet.
2012 Jan 24
0
[LLVMdev] Pointer aliasing
Hi Brent, Looking at your code I can see at least one reason why some of the store operations remain in the output since you are (through x, y, and z) writing in memory which exists outside of your function (p). Constant propagation also seems to work in the first few lines, *y = *x +1 (%3) is stored directly. The strange thing to me is that the same doesn't happen for *z = *x + 2. Here
2002 Oct 29
1
pretty not pretty
Hi, I have a following vector: > smallch [1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850 [7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580 [13] -0.0177740 0.0039393 Pretty (R 1.5.1) has problems with zero: > pretty(smallch) [1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02 [6] 8.000000e-02 1.000000e-01 1.200000e-01