similar to: # values used in a function in tapply

Displaying 20 results from an estimated 3000 matches similar to: "# values used in a function in tapply"

2019 Oct 28
2
[PATCH v2 13/15] drm/amdgpu: Use mmu_range_insert instead of hmm_mirror
From: Jason Gunthorpe <jgg at mellanox.com> Remove the interval tree in the driver and rely on the tree maintained by the mmu_notifier for delivering mmu_notifier invalidation callbacks. For some reason amdgpu has a very complicated arrangement where it tries to prevent duplicate entries in the interval_tree, this is not necessary, each amdgpu_bo can be its own stand alone entry.
2013 Jan 27
2
Loops
Dear Contributors, I am asking help on the way how to solve a problem related to loops for that I always get confused with. I would like to perform the following procedure in a compact way. Consider that p is a matrix composed of 100 rows and three columns. I need to calculate the sum over some rows of each column separately, as follows: fa1<-(colSums(p[1:25,])) fa2<-(colSums(p[26:50,]))
2002 Jul 28
2
Fatal Error while Installing Baldur's Gate II
Howdy Folks, I'm trying to install Baldur's Gate II on a windowsless Wine configuration and not having much luck. When I run Setup.exe from /cdrom, I get the Baldur's Gate II splash screen, the progress bar indicating that InstallShield is preparing to install Baldur's Gate II - Shadow of Amn and a message box stating 'Error installing iKernel.exe: (0x1400)'. When I
2005 Apr 21
1
colSums and rowSums with arrays - different classes and dim ?
Hi, I'm using colSums and rowSums to sum the first dimensions of arrays. It works ok but the resulting object is different. See > a3d <- array(rnorm(120, mean=2), dim=c(20,6,1)) > dim(colSums(a3d)) [1] 6 1 > dim(rowSums(a3d)) NULL > class(colSums(a3d)) [1] "matrix" > class(rowSums(a3d)) [1] "numeric" I was expecting rowSums to preserve the array
2010 Nov 28
4
how to divide each column in a matrix by its colSums?
Hi, I have a matrix, say m=matrix(c( 983,679,134, 383,416,84, 2892,2625,570 ),nrow=3 ) i can find its row/col sum by rowSums(m) colSums(m) How do I divide each row/column by its rowSum/colSums and still return in the matrix form? (i.e. the new rowSums/colSums =1) Thanks. Casper -- View this message in context:
2005 Jun 13
3
Athereos Wireless Domain 0
Hi Folks, I am trying to get my wireless network card work under dom0 of XEN. I could successfully install the ndiswrapper drivers and could see it being associated to AP. However I amn''t able to transmit any packets outbound. I could''nt even ping the AP. Interestingly when I run a tcpdump I can see few broadcast packets on the interface. There no rules in iptables for nat or
2001 Dec 14
2
colSums in C
Hi, all! My project today is to write a speedy colSums(), which is a function available in S-Plus to add the columns of a matrix. Here are 4 ways to do it, with the time it took (elapsed, best of 3 trials) in both R and S-Plus: m <- matrix(1, 400, 40000) x1 <- apply(m, 2, sum) ## R=16.55 S=52.39 x2 <- as.vector(rep(1,nrow(m)) %*% m) ## R= 2.39 S= 8.52 x3 <-
2007 Apr 16
1
colSum() in Matrix objects
Hi, I'd like to simply add column-wise using Matrix objects (Csparse). It looks like one can apply mosty any base function to these objects (i.e., apply, colSums), but there is a nasty conversion to traditional matrix objects if one does that. Is there any workaround? I can see colSum listed in the help for Class 'CsparseMatrix' , but I wonder whether I'm using the default
2008 Jul 11
3
number of effective tests
Dear R community, I am using 6 variables to test for an effect (by linear regression). These 6 variables are strongly correlated among each other and I would like to find out the number of independent test that I perform in this calcuation. For this I calculated a matrix of correlation coefficients between the variables (see below). But to find the rank of the table in R is not the right
2009 Nov 30
2
command similar to colSums for rowSums?
Working with an NxMxO sized matrix, currently I can do this in my code: if (max(colSums(array)) >= number) But to get an equivalent result using rowSums, I have to do: for (i in 1:10) { if (max(rowSums(array[,,i])) >= number) } I'm running both in a much larger loop that loops millions of times, so speed and such is quite a big factor for me. Currently, the colSums line uses about
2012 Jun 26
1
Zero inflated: is there a limit to the level of inflation
Hello, I have count data that illustrate the presence or absence of individuals in my study population. I created a grid cell across the study area and calcuated a count value for each individual per season per year for each grid cell. The count value is the number of time an individual was present in each grid cell. For illustration my data columns look something like this and are repeated for
2017 Oct 21
1
What exactly is an dgCMatrix-class. There are so many attributes.
> On Oct 21, 2017, at 7:50 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> C W <tmrsg11 at gmail.com> >>>>>> on Fri, 20 Oct 2017 15:51:16 -0400 writes: > >> Thank you for your responses. I guess I don't feel >> alone. I don't find the documentation go into any detail. > >> I also find
2009 Jan 28
3
for/if loop
Hi, it's my first time to write a loop with R for my homework. This loop is part of the function. I wanna assign values for hll according to panel [ii,1]=pp. I didn't get any error message in this part. but then when I further calculate another stuff with hll, the function can't return. I think it must be some problem in my loop. Probably something stupid or easy. But I tried to look
2009 Dec 04
5
logical masking of a matrix converts it to a vector
One problem I've been having is the special case in which only one row/column remains and the variable gets converted into a vector when entries are removed by logical masking. This is a problem because subsequent code may rely on matrix operations (apply, colsums, dim, etc) For example: > a <- matrix(c(1, 2, 3, 4), nrow = 2) > a [,1] [,2] [1,] 1 3 [2,] 2 4 >
2006 Dec 01
3
Make many barplot into one plot
Dear all, ## I have 4 tables like this: satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond"))) dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), dimnames=list(c("Negative", "Positive"),
2006 Jan 22
1
Customizing desktop systems
My company is now in the process of rolling out enterprise desktop systems (mostly rhel3 since we have some commercial software that is not quite ready for rhel4). Most of our users (ca. 120 workstations) are using RH9. I've developed a simple, extensible set of kickstart post procedures and firstboot procedures that provide a quick way to image new systems, but one thing is missing. I
2008 Mar 07
4
Warning: matrix by vector division
Dear list, I just made a very simple mistake, but it was hard to spot. And I think that I should warn other people, because it is probably so simple to make... === R code === # Let us create a matrix: (a <- cbind(c(0,1,1), rep(1,3))) # [,1] [,2] # [1,] 0 1 # [2,] 1 1 # [3,] 1 1 # That is a MISTAKE: a/colSums(a) # [,1] [,2] # [1,] 0.0000000 0.3333333
2003 Sep 05
2
domain join - no sambaSamAccount created
Hi, we are using Samba 3 ( CVS checkout from 09/01 ) on a SuSE 8.2 box with all patches applied. The passdb backend is LDAP / eDirectory 8.7 on another machine. The Samba box is supposed to work as a stand alone domain controller, so I am testing to join a client machine to it's domain. This is my "add machine script": /usr/bin/cpu useradd %u -d /dev/null -f
2005 Jan 27
1
[LLVMdev] Question about inserting IR code
Hi, From the file HowToUseJIT.cpp, I learned how to insert some calcuation IR code like Add/Sub/Mul etc by using Instruction *Add = BinaryOperator::createAdd(One, ArgX, "addresult", BB); By following this way, it works well when I insert some IR code whose operand is integer type like IntTy, however, when I tried to insert similar thing whose operands are float point, I got the
2011 Aug 14
3
Not sure how to use aggregate, colSums, by
I have a data frame called test shown below that i would like to summarize in a particular way : I want to show the column sums (columns y ,f) grouped by country (column e1). However, I'm looking for the data to be split according to column e2. In other words, two tables of sum by country. One table for "con" and one table for "std" shown in column e2. Finally at the