Displaying 11 results from an estimated 11 matches for "rowmin".
Did you mean:
rowman
2010 Mar 29
1
Suggestion: Adding quick rowMin and rowMax functions to base package
...here in the functions pmax and pmin,
but it is rather cumbersume to apply them to all columns of a matrix (if
one does not know how many columns the matrix has). Below, I have some
code that shows a very unelegant implementation that illustrates
possible speed gains if apply could be avoided:
rowMin = function(x) {
# Construct a call pmin(x[,1],x[,2],...x[,NCOL(x)])
code = paste("x[,",1:(NCOL(x)),"]",sep="",collapse=",")
code = paste("pmin(",code,")")
return(eval(parse(text=code)))
}
# Speed comparison: Taking rowM...
2012 Apr 19
4
Column(row)wise minimum and maximum
Hi,
Currently, the "base" has colSums, colMeans. It seems that it would be useful to extend this to also include colMin, colMax (of course, rowMin and rowMax, as well) in order to facilitate faster computations for large vectors (compared to using apply). Has this been considered before? Please forgive me if this has already been discussed before.
Thanks,
Ravi
Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Divisio...
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
2011 Aug 18
3
Coding question for behavioral data analysis
Hello all,
I have a question which I have been struggling with for several weeks
now, that I think might be easy for more proficient coders than
myself. I have a large behavioral dataset, with behaviors and the
times (milliseconds) that they occurred. Each subject has a separate
file, and a sample subject file can be generated using the following
syntax:
Time <- c(1000, 1050, 1100, 1500, 2500,
2008 Feb 10
2
View() + "End" key on Ubuntu=segfault
I can repeatably crash R (segfault)
by doing
n <- 10
z <- data.frame(a=1:n,b=1:n)
View(z)
and then hitting the "End" key on my keyboard.
I haven't got debugging going yet, but running under
gdb (without debugging symbols) does give this:
0xb7b63583 in strlen () from /lib/tls/i686/cmov/libc.so.6
R version 2.6.2 (2008-02-08)
i486-pc-linux-gnu
[Ubuntu Gutsy]
locale:
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts,
I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example:
A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix
B <-
2015 Jan 26
0
matrixStats 0.13.1 - Methods that Apply to Rows and Columns of a Matrix (and Vectors)
.... Most of the
major groundwork has already been done, but there is still room for
improvements. If you're using matrixStats functions in your package
already now, you should see some notable speedups for those function
calls, especially compared to what was available back in June. For
instance, rowMins() is now 5-20 times faster than functions such as
base::pmin.int() whereas in the past they performed roughly the same.
I've also added a large number of new package tests; the R and C
source code coverage has recently gone up from 59% to 96% (? and
counting) [https://coveralls.io/r/HenrikBen...
2015 Jan 26
0
matrixStats 0.13.1 - Methods that Apply to Rows and Columns of a Matrix (and Vectors)
.... Most of the
major groundwork has already been done, but there is still room for
improvements. If you're using matrixStats functions in your package
already now, you should see some notable speedups for those function
calls, especially compared to what was available back in June. For
instance, rowMins() is now 5-20 times faster than functions such as
base::pmin.int() whereas in the past they performed roughly the same.
I've also added a large number of new package tests; the R and C
source code coverage has recently gone up from 59% to 96% (? and
counting) [https://coveralls.io/r/HenrikBen...
2002 Jan 28
4
Functions on matrix row level
Hi together,
I have some data in a matrix structure - say 1000 rows with 10 columns. And
I like to do some calculations (like max, avg or min) on row level.
The only solution I found so fare was using a loop like
for (i in 1:1000) {
max[i] <- max(matrix[I,])
}
It looks like that this is not very fast.
Does an other way exists?
Kind regards
Ulrich
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
Hi Developers,
I am looking for another new project to help me get more up to speed
on R and to learn something outside of R internals. One recent R
issue I have run into is finding a fast implementations of the
equivalent to the following SAS code:
/* MDPC is an integer sort key made from two integer columns */
MDPC = (MD * 100000) + PCO;
/* sort the dataset by the key */
PROC SORT;
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example.
I modified a little to fit my real data, I got an error massage.
Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :
Group length is 0 but data length > 0
On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] <
ml-node+s789695n4657196h87@n4.nabble.com> wrote:
> Hi,
> Try this:
>