similar to: double in summary.c : isum

Displaying 20 results from an estimated 700 matches similar to: "double in summary.c : isum"

2010 Aug 23
1
Speeding up sum and prod
Looking for more ways to speed up R, I've found that large improvements are possible in the speed of "sum" and "prod" for long real vectors. Here is a little test with R version 2.11.1 on an Intel Linux system > a <- seq(0,1,length=1000) > system.time({for (i in 1:1000000) b <- sum(a)}) user system elapsed 4.800 0.010 4.817 > system.time({for (i
2015 Jun 01
2
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == "double" is much more time consuming when there are missing values versus when there are not. I'm observing this on both Window and Linux, but it's quite surprising to me. Currently, my main suspect is settings in on how R was built. The second suspect is my brain. I hope that someone can clarify the below
2019 Feb 20
3
code for sum function
Dear Tomas, Where do I find these files? Do they contain the code for the sum function? What do you mean exactly with your point on long doubles? Where can I find documentation on this? Cheers, Rampal On Mon, Feb 18, 2019, 15:38 Tomas Kalibera <tomas.kalibera at gmail.com wrote: > See do_summary() in summary.c, rsum() for doubles. R uses long double > type as accumulator on systems
2016 Feb 09
2
Modified LLVM IR
Hi, I want to edit LLVM generated IR file, like as given below, Original LLVM IR file, @.str2 = private unnamed_addr constant [17 x i8] c"\0AI am in one_11\0A\00", align 1 ; Function Attrs: nounwind define i32 @one_1(i32 %ivar1, i32 %ivar2) #0 { entry: %ivar1.addr = alloca i32, align 4 %ivar2.addr = alloca i32, align 4 %isum = alloca i32, align 4 store i32 %ivar1, i32*
2016 Feb 10
2
Modified LLVM IR
Hi, I want to call/add some functions(that defined in another file) on top of some functions, and reflect the same changes in object file. No, I am not looking for contractor. Thanks, Deepika On Tue, Feb 9, 2016 at 7:04 PM, mats petersson <mats at planetcatfish.com> wrote: > What is the condition for adding this code? > > What have you tried so far? [Or are you looking for a
2016 Feb 10
2
Modified LLVM IR
Hi, Yes I am looking for IR pass that will do insert call of functions that defined in another file. Links/suggestions that guide me to start for adding IR pass will help me so much. Regards, Deepika On Wed, Feb 10, 2016 at 1:03 PM, mats petersson <mats at planetcatfish.com> wrote: > So how do you know what you want to modify (conceptually)? > > Have you got a IR pass that you
2016 Feb 10
2
Modified LLVM IR
Hi, My requirement is something like as given below, a.c => a.obj contains a1() and a2() function b.c => b.obj contains b1() and b2() function main.c => main.obj call to a1, a2, b1, b2 Now, I want to move a1(), a2() from a.obj to b2.obj and on top of function b1() When I call b1() from main, it should call first a1, a2 and then function definition of b1 Can you please give me some
2015 Jun 01
0
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
This is a great example how you cannot figure it out after spending two hours troubleshooting, but a few minutes after you post to R-devel, it's just jumps to you (is there a word for this other than "impatient"?); Let me answer my own question. The discrepancy between my sum2() code and the internal code for base::sum() is that the latter uses LDOUBLE = long double (on some system
2019 Feb 21
0
code for sum function
Dear Rampal, you can download R source code in form of a tarball or from subversion, please see https://cran.r-project.org/doc/manuals/R-admin.html#Obtaining-R https://cran.r-project.org/doc/manuals/R-admin.html#Using-Subversion-and-rsync There is also a web access to subversion, so specifically the sum is available in https://svn.r-project.org/R/trunk/src/main/summary.c The definition of
2019 Dec 17
2
Build failure on powerpc64
>>>>> Tom Callaway >>>>> on Fri, 13 Dec 2019 11:06:25 -0500 writes: > An excellent question. It is important to remember two key > facts: > 1. With gcc on ppc64, long doubles exist, they can > be used, just not safely as constants (and maybe they > still can be used safely under specific conditions?). > 2. I am not an
2019 Feb 19
4
code for sum function
The algorithm does make a differece. You can use Kahan's summation algorithm (https://en.wikipedia.org/wiki/Kahan_summation_algorithm) to reduce the error compared to the naive summation algorithm. E.g., in R code: naiveSum <- function(x) { s <- 0.0 for(xi in x) s <- s + xi s } kahanSum <- function (x) { s <- 0.0 c <- 0.0 # running compensation for lost
2007 Mar 24
1
frequency tables and sorting by rowSum
Dear list, I have some trouble generating a frequency table over a number of vectors. Creating these tables over simple numbers is no problem with table() > table(c(1,1,1,3,4,5)) 1 3 4 5 3 1 1 1 , but how can i for example turn: 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 into 0 0 1 1 1 0 0 2 0 1 0 3 My second problem is, sorting rows and columns of a matrix by the rowSums/colSums. I did it
2019 Dec 13
3
Build failure on powerpc64
>>>>> Tom Callaway >>>>> on Thu, 12 Dec 2019 14:21:10 -0500 writes: > Hi R folks, > Went to build R 3.6.2 for Fedora/EPEL and got failures across the board. > Disabling the test suite for all non-intel architectures resolves most of > the failures, but powerpc64 dies in the compiler, specifically here: > gcc -m64
2020 Mar 25
1
Build failure on powerpc64
Do note that 3.6-patched will only be live for a day or two as we branch for 4.0.0 on Friday. Anything committed there is unlikely to make it into an official release (in principle, the 3.6 branch can be revived but it would take a very strong incentive to do so.) If you want an R-3.6.3-for-ppc, I think a vendor patch is the way. AFAIR (it's been more than a decade since I looked at this
2004 Apr 25
2
nonparametric multiple sample comparison
Hello all, Here goes one of my first functions. I want to make a nonparametric multiple sample comparison with unequal sample sizes (see Zar?s Biostatistical Analysis, 3rd. Ed., pg. 201 Example 10.11, pg. 288 Example 11.10). In the real world, I want to compare samples of fish length captured with different fishing gears. After using the Kruskal-Wallis test I want to check the differences
2019 Feb 21
1
code for sum function
Specifically: https://svn.r-project.org/R/trunk/src/main/summary.c And if you don't want to deal with Subversion, you can look at the read-only github mirror: https://github.com/wch/r-source/blob/e5b21d0397c607883ff25cca379687b86933d730/src/main/summary.c#L115-L131 On Thu, Feb 21, 2019 at 11:57 AM David Winsemius <dwinsemius at comcast.net> wrote: > > > On 2/20/19 2:55 PM,
2010 Sep 03
1
Fourteen patches to speed up R
I've continued to work on speeding up R, and now have a collection of fourteen patches, some of which speed up particular functions, and some of which reduce general interpretive overhead. The total speed improvement from these patches is substantial. It varies a lot from one R program to the next, of course, and probably from one machine to the next, but speedups of 25% can be expected in
2004 Oct 28
1
Internal function isUME() in findGeneric() is wrong (PR#7320)
Full_Name: Jeff Hallman Version: 2.0 OS: Linux Submission from: (NULL) (132.200.32.34) The function findGeneric() in the utils namespace contains this internal function: isUME <- function(e) { if (is.call(e) && (is.name(e[[1]]) || is.character(e[[1]]))) { switch(as.character(e[[1]]), UseMethod = as.character(e[[2]]), "{" =
2011 Jul 15
1
Confusing inheritance problem
I have library in development with a function that works when called from the top level, but fails under R CMD check. The paricular line of failure is rsum <- rowSums(kmat>0) where kmat is a dsCMatrix object. I'm currently stumped and looking for some ideas. I've created a stripped down library "ktest" that has only 3 functions: pedigree.R to create a pedigree or
2002 Dec 20
1
smbclient and large file support
smbclient (and smbtar) in version 2.2.7a (and prior) has problems with large files (> 4GB). The following patch (against 2.2.7a) fixes all known problems with this. This code has been checked into the CVS tree in all branches as well. -- ====================================================================== Herb Lewis Silicon Graphics Networking Engineer