similar to: system.time gives error when "=" is used for assignment (R-2.6.0)

Displaying 20 results from an estimated 3000 matches similar to: "system.time gives error when "=" is used for assignment (R-2.6.0)"

2008 May 05
1
Is there any way to find out how a certain functions are implemented in R?
Hello I wrote a bootstrap program in C language that is called and run by R. When I tried it, it is slow and I'm trying to write and run the whole thing in C. But I cannot use handy functions in R and need to figure out how to write those functions by myself. Is there any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For
2008 Mar 30
1
norm_rand() in R-extension vs rnorm in R ---which is better?
I need to generate good quality of random numbers from univariate normal distribution for further transformation. I tried rnorm in R but it was not good sometimes. Someone said C++ standard library or Fortran's built-in functions for that are good. I found that there is double norm_rand() in R-extension. Does this function, norm_rand() use the same algorithm as rnorm in R or something similar
2008 Apr 18
1
R-extension in unix system -- help to locate header files
Hi list, To call C, I used to use R-extension in windows but I'm moving to unix system because my PC doesn't have enough memory. My C codes requires to include the following header files: #include <stdlib.h> #include <R.h> #include <Rdefines.h> #include <Rmath.h> #include <R_ext/Applic.h> #include <R_ext/PrtUtil.h> In windows, I had no problem with it
2009 Mar 19
1
object size of a matrix and a list
Hello, My program calculates several variables at each iteration and some of them are integers and the rest are numeric. When I save them into a matrix, all of them are of numeric type, of course. I'm trying to find a way to save time/memory of my program and I was thinking that it might help to force some variables to be of integer type and the other columns numeric type. But when I
2008 May 04
1
help with segmentation fault
Hello all, I'm trying to have C called by R. I wrote C codes that worked perfectly fine with R-2.6.0 in windows system ( using R tools). I had to change to SuSE Linux (this system has 3.2 GHz Intel Xeon processors and 4 GB of RAM), the C codes were compiled okay but when it was called to R-2.6.2, I got error mesage : ***caught segfault*** address 0x1df5000, cause 'memory not
2008 Apr 08
1
Using Rtools in Unix environment
The previous mail I wrote was bounced for some reason and I'm writing it again... I have used Rtools in windows to call C from R but my computer does not have enough memory for my current project. So I'm trying to use Rtools in the high performance computer at my school. The guy who handles the HPC says it's Unix and I have three questions: 1. I found from the web that Unix has
2008 Mar 05
1
Question on "assign(paste.."
Hello, I'm having trouble in using "assign(paste ..." command . I could create several dataframes following trinomial distribution using it but it could not be used to check their row means of the created dataframe. For example, the following works: probTrt=matrix(0,4,3); probTrt; #malf, death, normal probTrt[1,]=c(0.064,0.119,0.817);#for Trt 1 probTrt[2,]=c(0.053,0.125,0.823);#for
2008 Jul 25
0
nlminb--lower bound for parameters are dependent on each others
Hello I'm trying to solve two sets of equations (each set has four equations and all of them share common parameters) with nlminb procedure. I minimize one set and use their parameters as initial values of other set, repeating this until their parameters become very close to each other. I have several parameters (say,param1, param2) and their constraints are given as inequality and depend
2008 Nov 06
1
trouble with for loop
Hello, I'm having two similar problems with for loop and I would appreciate any help or comment. I want to use "for loop" to calculate series of initial values for an optimization problem. But some initial values have my function quit due to problems like calculating the inverse of singular matrices. I don't want to make my program check determinants and skip it if it is
2013 Sep 05
2
binary symmetric matrix combination
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17 ?y1 0 1 1 1 ?c1 1 0 1 1 ?c2 1 1 0 1 ?l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4??? s2???? s30 ?y1 0 1 1 1 ?h4 1 0 1 1 ?s2 1 1 0 1 ?s30 1 1 1
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 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
2011 Apr 07
1
An extention of outer() ?
Dear all, as per my understanding, outer() function is to facilitate 2-dimensional function evaluation, like to evaluate f(x,y) for different values of x and y. However I have slightly modified version of that, where x is a matrix with, say, 5 rows and 2 columns and y is a vector. Let take following example: fn1 <- function(x1, x2, y) return (x1+x2+y) x <- matrix(1:10, nc = 2) y
2013 Sep 21
1
[LLVMdev] LLD input graph handling proposal
Hi Joerg, I would love to have this behavior(solaris/hp-ux linkers used to do this). cat > main.c << \! int main() { fn(); fn1(); } ! cat > fn.c << \! int fn() { return 0; } ! cat > fn1.c << \! int fn1() { return 0; } ! gcc -c -fPIC main.c fn.c fn1.c ld -shared fn1.o -o libfn1.so ld -shared fn.o -o libfn.so -L. -lfn1 ld main.o libfn.so ld: warning:
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at
2006 Jun 22
2
weights in lm, glm (PR#9023)
Full_Name: James Signorovitch Version: 2.2.1 OS: WinXP Submission from: (NULL) (134.174.182.203) In the code below, fn1() and fn2() fail with the messages given in the comments. Strangely, fn2() fails for all data sets I've tried except for those with 100 rows. The same errors occur if glm() is used in place of lm(), or if R 2.1.1 is used on a unix system. Thanks for looking into this.
2010 Jul 05
3
data.frame: adding a column that is based on ranges of values in another column
Dear List, I've been looking tirelessly for a solution to this dilemma but without success. Perhaps someone has an idea that will guide me in the right direction. Suppose I have the following data.frame: DF = data.frame(X = c(114.5508, 114.6468, 114.6596, 114.6957, 114.6828, 114.8903, 114.9519, 114.8842, 114.8579, 114.8489), Y = c(47.14094, 46.98874, 46.91235, 46.88265, 46.80584, 46.67022,
2011 May 09
2
Vectorizing a function: what does it mean?
Dear all, I would really appreciate if somebody can help me to understand what does the phrase "Vectorize your function" mean? And what is the job of Vectorize() function in doing that? I have read many threads where experts suggest to Vectorize the function, which will speed up entire calculation (and more elegant ofcourse.) I used to think that vectorizing function means, to create a
2016 Dec 15
2
distinct DISubprograms hindering sharing inlined subprogram descriptions
On Thu, Dec 15, 2016 at 1:30 PM Teresa Johnson <tejohnson at google.com> wrote: On Thu, Dec 15, 2016 at 11:38 AM, David Blaikie <dblaikie at gmail.com> wrote: On Thu, Dec 15, 2016 at 11:26 AM Teresa Johnson <tejohnson at google.com> wrote: Trying to wrap my brain around this, so a few questions below. =) Sure thing - sorry, did assume a bit too much arcane context here.
2005 Dec 29
1
S4 classes: referencing slots with other slots
For those who suggest other ways to do this, I ALREADY HAVE ANOTHER DESIGN SOLUTION, DESCRIBED AT THE END. That being said, I want to know if it's possible to reference a slot in an S4 class from another slot, i.e. I'd like to have the "self.*" semantics of Python so that I can reuse a slot. That is, for various reasons it would be nice to be able to do something like: