search for: matrixstat

Displaying 20 results from an estimated 56 matches for "matrixstat".

Did you mean: matrixstats
2015 Jan 26
0
matrixStats 0.13.1 - Methods that Apply to Rows and Columns of a Matrix (and Vectors)
A new release 0.13.1 of matrixStats is now on CRAN [http://cran.r-project.org/package=matrixStats]. The source code is available on GitHub [https://github.com/HenrikBengtsson/matrixStats]. WHAT DOES IT DO? The matrixStats package provides highly optimized functions for computing common summaries over rows and columns of matrices,...
2015 Jan 26
0
matrixStats 0.13.1 - Methods that Apply to Rows and Columns of a Matrix (and Vectors)
A new release 0.13.1 of matrixStats is now on CRAN [http://cran.r-project.org/package=matrixStats]. The source code is available on GitHub [https://github.com/HenrikBengtsson/matrixStats]. WHAT DOES IT DO? The matrixStats package provides highly optimized functions for computing common summaries over rows and columns of matrices,...
2018 Jan 25
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
Just following up on this old thread since matrixStats 0.53.0 is now out, which supports this use case: > x <- rep(TRUE, times = 2^31) > y <- sum(x) > y [1] NA Warning message: In sum(x) : integer overflow - use sum(as.numeric(.)) > y <- matrixStats::sum2(x, mode = "double") > y [1] 2147483648 > str(y) num 2.15...
2011 Feb 15
1
matrixStats: Extend to arrays too (Was: Re: Suggestion: Adding quick rowMin and rowMax functions to base package)
Hi. On Sun, Feb 13, 2011 at 10:18 AM, TakeoKatsuki <takeo.katsuki at gmail.com> wrote: > > Hi Henrik, > > It would be nice if functions of the matrixStats package can handle array > data. > For example, rowSums() of the base package sums along the third axis of an > array by rowSums(x, dim=2). That is a good idea. This was indeed the initial objective before starting matrixStats. After debating (mostly with myself) on what a consistent a...
2017 Nov 29
2
SAMseq errors
Hi, I am trying to using SAMseq() to analyze my RNA-seq experiment (20000 genes x 550 samples) with survival endpoint. It quickly give the following error: > library(samr)Loading required package: imputeLoading required package: matrixStats Attaching package: ?matrixStats? The following objects are masked from ?package:Biobase?: ? ? anyMissing, rowMedians Warning messages:1: package ?samr? was built under R version 3.3.3?2: package ?matrixStats? was built under R version 3.3.3 > samfit<-SAMseq(data, PFI.time,censoring.status=PF...
2018 Feb 20
0
Take the maximum of every 12 columns
It looks like OP uses a data.frame, so in order to use matrixStats (I'm the author) one would have to pay the price to coerce to a matrix before using matrixStats::rowMaxs(). However, if it is that the original data could equally well live in a matrix, then matrixStats should be computational efficient for this task. (I've seen cases where an original m...
2018 Feb 20
2
Take the maximum of every 12 columns
...ser system elapsed > 2.162 0.045 2.207 > > ## 150 times slower! > > > identical(r1,r2) > [1] TRUE > > pmax() is there for a reason. > Or is there something I am missing? > ?Personal preference I think. I prefer the consistency of apply. If speed is an issue matrixStats is both consistent and fast:? ?library(matrixStats) x <- matrix(runif(12e6), ncol=12) system.time(r1 <- do.call(pmax,as.data.frame(x))) ## user system elapsed ## 0.109 0.000 0.109 system.time(r2 <- apply(x,1,max)) ## user system elapsed ## 1.292 0.024 1.321 system.ti...
2014 Dec 06
1
R CMD check --as-cran and (a)spell checking
...*built* package to tell 'R CMD check --as-cran' not to report these words as misspelled. I want this dictionary to come with the *.tar.gz such that it will be available regardless where the package is checked. For instance, currently I get: * using log directory 'T:/R/_R-3.1.2patched/matrixStats.Rcheck' * using R version 3.1.2 Patched (2014-12-03 r67101) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'matrixStats/DESCRIPTION' ... OK * this is package 'matrixStats' version '0.12.0' * checking CRAN incoming fe...
2017 Nov 29
0
SAMseq errors
Sorry forgot to use plain text format, hope this time it works: Hi, I am trying to using SAMseq() to analyze my RNA-seq experiment (20000 genes x 550 samples) with survival endpoint. It quickly give the following error: > library(samr) Loading required package: impute Loading required package: matrixStats Attaching package: ?matrixStats? The following objects are masked from ?package:Biobase?: ? ? anyMissing, rowMedians Warning messages: 1: package ?samr? was built under R version 3.3.3? 2: package ?matrixStats? was built under R version 3.3.3 > samfit<-SAMseq(data, PFI.time,censoring.st...
2018 Jan 30
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...f length() and sum()) Cheers, H. On 01/27/2018 03:06 AM, Martin Maechler wrote: >>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>>> on Thu, 25 Jan 2018 09:30:42 -0800 writes: > > > Just following up on this old thread since matrixStats 0.53.0 is now > > out, which supports this use case: > > >> x <- rep(TRUE, times = 2^31) > > >> y <- sum(x) > >> y > > [1] NA > > Warning message: > > In sum(x) : integer overflow - use sum(as.numer...
2018 Jan 27
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Thu, 25 Jan 2018 09:30:42 -0800 writes: > Just following up on this old thread since matrixStats 0.53.0 is now > out, which supports this use case: >> x <- rep(TRUE, times = 2^31) >> y <- sum(x) >> y > [1] NA > Warning message: > In sum(x) : integer overflow - use sum(as.numeric(.)) >> y <- matrixStats::sum2(x, mo...
2020 May 20
2
Precision of function mean,bug?
> On Wednesday, May 20, 2020, 7:00:09 AM EDT, peter dalgaard <pdalgd at gmail.com> wrote: > > Expected, see FAQ 7.31. > > You just can't trust == on FP operations. Notice also Additionally, since you're implementing a "mean" function you are testing against R's mean, you might want to consider that R uses a two-pass calculation[1] to reduce floating
2018 Feb 01
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...H. > On 01/27/2018 03:06 AM, Martin Maechler wrote: >>>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>>>> on Thu, 25 Jan 2018 09:30:42 -0800 writes: >> >> > Just following up on this old thread since matrixStats 0.53.0 is now >> > out, which supports this use case: >> >> >> x <- rep(TRUE, times = 2^31) >> >> >> y <- sum(x) >> >> y >> > [1] NA >> > Warning message: >> > In sum(x)...
2017 Jun 02
4
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
Hi, I have a long numeric vector 'xx' and I want to use sum() to count the number of elements that satisfy some criteria like non-zero values or values lower than a certain threshold etc... The problem is: sum() returns an NA (with a warning) if the count is greater than 2^31. For example: > xx <- runif(3e9) > sum(xx < 0.9) [1] NA Warning message: In sum(xx
2015 Aug 14
2
Why not pthreads on Windows in 'parallel' package?
On Windows there are a few 'pthreads' implementation, e.g. pthreads-w32 and winpthreads [https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-pthreads]. We're thinking of giving them a try for the matrixStats package, and basic tests indicates it works, but since Windows pthreads are not used by core R (or?) I've got a little bit worried that we will face overwhelming problems. So, why are the above Windows implementations not used in the 'parallel' package in order to add multicore suppor...
2015 Mar 19
2
Familia *pply
...cular > la media por columnas? Si es asi, hay dos maneras: > > 1. Usa colMeans(x), donde "x" es tu matriz de datos > 2. Usa apply(x, 2, mean) donde "x" es tu matriz de datos > > Existe una tercera pero menos conocida posibilidad que es usando el > paquete matrixStats. Esta implementado en C en su mayoria y, de > acuerdo con el autor, es mucho mas rapido que la familia *apply. En > http://cran.r-project.org/web/packages/matrixStats/vignettes/matrixStats-methods.html > puedes encontrar mas informacion. > > Saludos cordiales, > Jorge.- >...
2015 Aug 15
1
Why not pthreads on Windows in 'parallel' package?
Aaaah ... and argh - I should have better not to post R question at midnight, especially when I know it forks the process and it's not using threads. Brain meltdown. (So, we'll proceed trying to use pthreads in matrixStats also for Windows). Sorry for the noise and thanks Kasper. Henrik On Aug 15, 2015 02:52, "Kasper Daniel Hansen" <kasperdanielhansen at gmail.com> wrote: > mclapply uses fork which is different from pthreads. As I understand it, > pthreads requires you to rewrite code, fork...
2015 Mar 19
3
Familia *pply
Buenas a todos. Desde hace un tiempo estoy tratando de aplicar las funciones de la familia *pply en todo lo que puedo, pero todavía no es algo que me surja tan rápidamente o naturalmente al momento de los loops como usar for(). Conozco las ventajas de usar estas funciones y por eso mi intento de hacerme de ellas. Por ejemplo en este problema: data=matrix(rnorm(100*20),20,100)
2015 Mar 21
2
Familia *pply
...s maneras: > > > > 1. Usa colMeans(x), donde "x" es tu matriz de datos > > 2. Usa apply(x, 2, mean) donde "x" es tu matriz de datos > > > > Existe una tercera pero menos conocida posibilidad que es usando el > > paquete matrixStats. Esta implementado en C en su mayoria y, de > > acuerdo con el autor, es mucho mas rapido que la familia *apply. En > > > http://cran.r-project.org/web/packages/matrixStats/vignettes/matrixStats-methods.html > > puedes encontrar mas informacion. > >...
2020 May 21
0
Precision of function mean,bug?
...quot;mean" function you are >>> testing >>> > against R's mean, you might want to consider that R uses a two-pass >>> > calculation[1] to reduce floating point precision error. >>> >>> This one is important. >>> >>> FWIW, matrixStats::mean2() provides argument refine=TRUE/FALSE to >>> calculate mean with and without this two-pass calculation; >>> >>> > a <- c(x[idx],y[idx],z[idx]) / 3 >>> > b <- mean(c(x[idx],y[idx],z[idx])) >>> > b == a >>> [1] FALSE >&gt...