similar to: Code compilation: Drop certain statements in a function before calling it multiple times?

Displaying 20 results from an estimated 3000 matches similar to: "Code compilation: Drop certain statements in a function before calling it multiple times?"

2011 Apr 16
2
Chinese character is not shown properly for some programs
Just dived into linux recently and spent a whole day on trying geing chinese programs working properly in wine. The situation is that some chinese programs (like eMule) display Chinese character very nicely while some others can not. Here is the screenshot: [Image: http://www.jg300.com/www/Screenshot-dzh.png ] What I have done: 1. apt-get ttf-wqy-microhei 2. Copy the downloaded font to
2002 Mar 01
1
Excel Add-in
I'm trying to make a connexion beetween Excel and R. It works for simple requests but it seems that complexe functions won't work. Does anybody knows how complexe can be the data set and function used? Does it exist something else than the Erich Neuwirth Add-in (which is already really interesting) ? Thanks Nolwenn ----------------------------------------------------------------------
2012 Jan 06
1
Assign and cmpfun
Hi All, I've just recently discovered the cmpfun function, and was wanting to to create a function to assign this to all the functions i have created, but without explicitly naming them. I've achieved this with: foo <- function(x) { print(x)} bar <- function(x) { print(x + 1)} > foo <- function(x) { print(x)} > foo function(x) { print(x)} > cmpfun(foo) function(x) {
2014 May 02
1
Authors@R: and Author field
Hi to all Authors@R: c(person("fooa","foob", role = c("aut","cre"), email = "fooa.foob@fooc.de"), person("foo1","foo2", role = c("ctb"), email = "foo1.foo2@foo3.de")) Author: fooa foob, with contributions from foo1 foo2 using r CMD check --as-cran .. (R 3.1
2002 Mar 07
2
Statconnector and Excel
Hi, I'm trying to combine a VBA macro and a R package. I've installed the R-(D)COM and the R-excel interface by Neuwirth. They seem to work both. However I would like to display the r-generated data in an Excel sheet as an array but I don't manage. Here is an example of my source: Sub doR() Call RInterface.StartRServer Call RInterface.RRun("library(mdnn)") Call
2019 Apr 03
0
stopifnot -- eval(*) inside for()
With f <- function(x) for (i in 1) x fc <- cmpfun(f) (my previous example), error message of fc(is.numeric(y)) shows the originating call as well, while error message of f(is.numeric(y)) doesn't. Compiled version behaves differently. Even with f <- function(x) for (i in 1) {x; eval(expression(i))} fc <- cmpfun(f) , error message of fc(is.numeric(y)) shows the originating call in R
2011 Apr 01
1
[LLVMdev] vestiges of multiple return values
Hi, I was trying to remove some old code that handles ReturnInsts with more than 1 operand -- see attached patch -- when I stumbled across test/Assembler/aggregate-return-single-value.ll: define { i32 } @fooa() nounwind { ret i32 0 } ... define [1 x i32] @fooc() nounwind { ret i32 0 } Is there really any need to handle these odd cases, where the type of the value being returned doesn't
2015 Sep 14
3
Optimization bug when byte compiling with gcc 5.2.0 on windows
When building R-devel with gcc 5.2.0 (mingw-w64 v4) on Windows, make check fails reg-tests-1b.R at the following check: x <- c(1:2, NA) sx <- sd(x) !is.nan(sx) Here 'sx' should be 'NA' but it is 'NaN'. It turns out this problem only appears when the function is byte compiled with optimization level 3: mysd <- function (x, na.rm = FALSE) sqrt(var(if
2002 Jun 28
0
Tr: RE: Samba 2.2.5 and printers
Ok, I solved the problem by myself. The problem was that the users with wich I tried to connect to the printer where defined as admin users, and I declared root as an invalid user in the samba configuration, so it always give me an access denied because it tried to connect as root. Anyway thanks for the time you waste trying to help me ;-) ----Message r?exp?di?---- >Date: Thu, 27 Jun 2002
2001 Nov 19
1
Pb w2k <-> samba
hello, 1)i have samba 2.2.2 running on HPUX11.0 64 bits and i have the folowing message in my user log: [2001/11/19 20:29:04, 0] smbd/nttrans.c:(1762) call_nt_transact_ioctl: Currently not implemented. [2001/11/19 20:29:04, 0] lib/util_sec.c:(94) Failed to set gid privileges to (-1,-2) now set to (0,0) uid= (0,0) [2001/11/19 20:29:04, 0] lib/util.c:(1055) PANIC: failed to set gid 2) when i
2003 Jun 19
3
sciViews
Bonjour, J'ai t?l?charg? SciViews Insider que je trouve tr?s convivial. Par contre, je n'arrive pas ? comprendre comment enregistrer un script R en type de fichier R justement. Mes programmes fonctionnent tr?s bien, mais SciViews me propose uniquement de les enregistrer au format txt sous un type de fichier "bloc notes". Comment les enregistrer avec l'extension .R comme le
2019 Jan 03
2
Compiler + stopifnot bug
Hi, I found the following issue in r-devel (2019-01-02 r75945): `foo<-` <- function(x, value) { bar(x) <- value * x x } `bar<-` <- function(x, value) { stopifnot(all(value / x == 1)) x + value } `foo<-` <- compiler::cmpfun(`foo<-`) `bar<-` <- compiler::cmpfun(`bar<-`) x <- c(2, 2) foo(x) <- 1 x # should be c(4, 4) #> [1] 3 3 If the functions
2009 Nov 30
1
RSQLite does not read very large values correctly
Hello, I am trying to import data from an SQLite database to R. Unfortunately, I seem to get wrong data when I try to import very large numbers. For example: I look at the database via SQLiteStudio(v.1.1.3) and I see the following values: OrderID Day TimeToclose 1 2009-11-25 29467907000 2 2009-11-25 29467907000 3 2009-11-25 29467907000 Now I run this R Code: >
2015 Sep 14
0
Optimization bug when byte compiling with gcc 5.2.0 on windows
I believe the issue is that on Windows the sqrt function when called with a NaN does not return the same NaN, as it does on other platforms. We have #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \ __GNUC__ <= 4 # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x)) #else # define R_sqrt sqrt #endif for implementing the SQRT opcode. I suspect this came from Duncan
2016 Nov 11
0
Frames in compiled functions
It looks like the byte compiler is optimizing local() to an immediately-invoked function, instead of using eval() and substitute(). I don't know if that's exactly how it's implemented internally, but that's what it looks like here: compiler::enableJIT(0) fun <- function(x) { local(sys.calls()) } fun(1) ## [[1]] ## fun(1) ## ## [[2]] ## local(sys.calls()) ## ## [[3]] ##
2005 Apr 27
1
RE: [R] when can we expect Prof Tierney's compiled R?
Luke, Thank you for sharing the benchmark results. The improvement is very substantial, I am looking forward to the release of the byte compiler! The arithmetic shows that x[i]<- is still the bottleneck. I suspect that this is due to a very involved dispatching/search for the appropriate function on the C level. There might be significant gain if loops somehow cached the result of the initial
2003 Jun 26
3
create help files
Hello, I have to create help files on R. I used the "package.skeleton" function which allowed to me to create a personal package with my list of functions. But I don't understand what I have to install to use these. That needs the tools to build packages from source to be installed. I will need the files in the R binary Windows distribution for installing source packages to be
2019 Jan 04
2
Compiler + stopifnot bug
On 03/01/2019 3:37 p.m., Duncan Murdoch wrote: > I see this too; by bisection, it seems to have first appeared in r72943. Sorry, that was a typo. I meant r75943. Duncan Murdoch > > Duncan Murdoch > > On 03/01/2019 2:18 p.m., I?aki Ucar wrote: >> Hi, >> >> I found the following issue in r-devel (2019-01-02 r75945): >> >> `foo<-` <-
2015 Sep 14
2
Optimization bug when byte compiling with gcc 5.2.0 on windows
On 14/09/2015 9:36 AM, luke-tierney at uiowa.edu wrote: > I believe the issue is that on Windows the sqrt function when called > with a NaN does not return the same NaN, as it does on other platforms. > We have > > #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \ > __GNUC__ <= 4 > # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x)) > #else
2004 Feb 03
0
GEE
Bonjour, J'etudie une population de chevaux en captivite. Je souhaite identifier le ou les facteurs qui influencent la fecondite des femelles (=nombre de poulain= 0 ou 1) depuis 1995 jusqu'a 2003. Les variables explicatives sont donc disponibles pour les femelles par annee : fem1_annee1 fem2_annee1 fem3_annee1 fem1_annee2 fem2_annee2 fem3_annee2 fem4_annee2 etc. Le nombre de femelles