Displaying 20 results from an estimated 32 matches for "nxm".
Did you mean:
num
2008 Sep 17
1
Exact test in nxm contingency table
Hello,
I am trying to find a permutation test that works on a general nxm table. The data set is small enough to have cells with too small counts to make chi2-approximation invalid. If the table was a 2x2 contingency table I would like to use a Fsher exact test (fisher.test) but that wont work in this general table.
Does there exist a general function for this test.
Be...
2003 Apr 02
1
Can boot return matrix?
...riate observation, so each
bootstrap sample would be an n x m matrix, and on each sample I want to
calculate the n x n matrix.
This task can be done with the sample function, but I would like to use
the boot() function. I hope that it is going to be faster.
Something like this:
f1 <- function(nxm.matrix){...; return(nxn.matrix)}
f2 <- function(nxm.matrix, i) f1(nxm.matrix[i,])
boot.out <- boot(nxm.matrix, R, f2)
Error: incorrect number of subscripts on matrix
Since the final goal would be to put a confidence interval on the
statistics in each cell of the matrix I would like to use th...
2001 May 19
2
calculations on diagonals of a matrix
Given an nxm matrix A I want to compute the nxm matrix B whose ij-th
element is the sum of the elements of A lying on the diagonal that ends
with element ij, i.e.,
b_ij = a_ij + a_(i-1)(j-1) + a_(i-2)(j-2) + ...
In APL (which I no longer use), I would use the 'rotate' operator to derive
an arr...
2007 Jul 31
3
Nonlinear optimization with constraints
...mization. I would like to ask if there is R-function/package for solving the problem below:
Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n.
subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a scalar.
(x is a vector of variables, A is nxm matrix, b is a vector)
[[alternative HTML version deleted]]
2006 Apr 01
1
Using vectorization instead of for loop for performing a calculation efficiently
I am trying to write an efficient function that will do the following:
Given an nxm matrix, 10 rows (observations) by 10 columns (samples)
for each row, test of all values in the row are greater than a value k
If all values are greater than k, then set all values to NA (or something),
Return an nxm matrix with the modified rows.
If I do this with a matrix of 20,000 rows, I will...
2003 Nov 03
3
A matrix is full rank is equal to having independent columns?
Dear R listers,
Just a simple question.
If we say an nxm matrix (n>m) is full rank of m,
does this mean that this matrix has linearly independent columns?
They are the same definition or needs some proof?
Thanks for your answer.
Fred
[[alternative HTML version deleted]]
2018 May 04
0
RFC: virtual-like methods via LLVM-style RTTI
...ifferentiate instance types?
From your code, it looks as if you’re implementing an inverted vtable structure, where there is a per-method vtable with per-subclass entries, rather than a traditional vtable where you have one per class and per-method entries. Your total vtable space goes from being NxM to being MxN, which doesn’t sound like an improvement. This kind of approach is generally popular in late-bound dynamic languages with duck typing where you have a lot of methods with few overrides and it’s worth having a slightly more expensive lookup to have a sparser structure than the full NxM...
2007 Mar 05
2
Linear programming with sparse matrix input format?
Hi.
I am aware of three different R packages for linear programming: glpk,
linprog, lpSolve. From what I can tell, if there are N variables and M
constraints, all these solvers require the full NxM constraint matrix. Some
linear solvers I know of (not in R) have a sparse matrix input format. Are
there any linear solvers in R that have a sparse matrix input format?
(including the possibility of glpk, linprog, and lpSolve, in case I might
have missed something in the documentation). Tha...
2011 Jul 19
3
calculating the mean of a random matrix (by row) and some general questions
...mean etc) to get some
analysis? I'd be very thankfull for some of your thoughts about
"approaches".
Now the question: I'm trying to build a vector with n entries, each
consisting of the mean of m random numbers (exponential distributed for
example). My approach was to construct a nxm random matrix and then to
somehow take the mean of each row. But in the mean function there is no
parameter to do this, so the intended approach of R is probably different..
any ideas? =)
Richard
--
View this message in context: http://r.789695.n4.nabble.com/calculating-the-mean-of-a-random-matri...
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
Hello,
In an effort to help LLVM-style projects save memory, I’ve been toying with some macros that provide an alternative to C++ vtables that use LLVM-style RTTI design patterns instead. Is this something that LLVM or sub-projects think is worth pursuing? Or are the macros below too ugly/problematic? Feedback would be appreciated.
Thanks,
Dave
//===- llvm/Support/VTable.h - LLVM-style
2006 Sep 21
1
How to generating diagnal blocks ?
Hi,
I am trying to creat a matrix with diagnal blocks, say, I have a matrix X of any dimension (nxm) ,and would like to have:
X
X
X...
2009 Dec 04
1
Converting a Matrix in a colum vector
Hi all,
Imagine I have a matrix G
with N rows
and M columns
So L=NxM is the number of different cells in my matrix.
I want to create a column vector F whose size will be F(L,1)
So the fisrt row in F is G(1,1)
Second row in F is G(1,2)
When we arrive to a point M
the element M+1 will be G(2, 1)
Element M+2 will be G(2,2) and so on.
I´m trying but allways error......
2009 Mar 13
1
Help with Function!
Dear All,
I need to write 'n' functions on 'm' variables. The functions should be
constructed according to the values of an (nxm) matrix of '1/0' values as
follows. For example,
if row1 is equal to ,say [1 0 .......0 0] then f1 <- (1+x1)
if row 2 is equal to, say [1 1 1 0...0 1] then f2
<-(1+x1)*(1+x2)*(1+x3)*(1+xm)
if row n is equal to [0 1 0 1 1 0 ..... 0] then fn <-(1+x2)*(1+x4)*(1+x5)
Is there an effi...
2011 Aug 20
1
t() prior to data rotation
Dear All,
I have come upon an R-mode PCA protocol that uses the following arguments,
where "mydata.txt" is an nxm matrix of n objects and m variables:
> a <- read.table("mydata.txt")
> b <- t(a)
> c <- prcomp(b)
> c$rotation
The user then plots the coordinates given by c$rotation (PC1 and PC2) as the
"scores" of their PCA plot.
This doesn't make sense to me as th...
2012 Jul 31
1
ways of getting around allocMatrix limit?
I need to multiply to very large, nonsparse matrices, and so get the
error "allocMatrix: too many elements specified".
Is there a way to set the limit for allocMatrix?
In my case, the two matrices, A and B, are nxm and mxp where m is
small, so I could subdivide each into blocks of submatrices
A=rbind(A1,A2,...) and B=cbind(B1,B2,...) then multiply each pair of
submatrices, but I was thinking there must be a better way to get
around the allocMatrix limit. I'd be grateful for any suggestions!
Thanks,
Dav...
2001 Jun 12
1
cophenetic matrix
...e name:
### filename.arbre
### source("cophmatrix.r")
###
cophmatrix <- function(){
library(mva)
library(sm)
nom <- ask(message="Name of the file")
nbre <- ask(message="Number of sounds")
quest <- ask(message="Matrix of dissimilarity (1) or nxm matrix (2)")
fichier <- read.table(nom)
## matrix nxn ou nxm
## proximity between objects: nxn or description of n objects with m attributes
if(quest == 1){
dis1 <- as.dist(fichier)
}
else{
methode <- ask(message="The distance measure to be used = euclidean:1...
2005 Apr 15
5
Pearson corelation and p-value for matrix
Hi,
I was trying to evaluate the pearson correlation and the p-values for an nxm matrix, where each row represents a vector. One way to do it would be to iterate through each row, and find its correlation value( and the p-value) with respect to the other rows. Is there some function by which I can use the matrix as input? Ideally, the output would be an nxn matrix, containing t...
2010 Sep 12
4
using read.table, removing extra quotation mark from a text field? (e.g. ""cat" )
I am using read.table to import a text file within R.
There are several "errors" in my text file. An "extra" quotation mark has
inadvertently been included within a few text fields.
e.g. for a pipe (|) delimited text file, I have something similar to this:
1|7|30| "dog"
2|6|25| ""cat"
3|4|20|""
4|5| 56| "mouse"
5|3|56|
2012 Sep 29
1
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
...adigms. There is interest in supporting OpenACC, for example, which
> will require data copying clauses, and it would make sense to share
> as much of the infrastructure as possible with OpenMP. Are you
> interested in providing Cilk support as well? We probably don't want to
> have NxM slightly-different ways of expressing 'this is a parallel
> region'. There are obviously cases in which things need to be specific
> to the interface (like runtime loop scheduling in OpenMP which implies
> a specific interaction with the runtime library), but such cases may be
>...
2004 Jul 13
1
locator() in a multiple plot setting
Hi
based on some code from Thomas Petzoldt, I have a question:
---
opar <- par(mfrow = c(2,4))
slices <- 8
m <- matrix(runif(100),10,10)
my.list <- list()
for (slice in 1:slices) {
my.list[[slice]] <- m
}
for (slice in 1:slices) {
x <- 1*(1:25)
y <- 1*(1:25)
z <- my.list[[slice]]
image(list(x = 0:9, y = 0:9, z = z))
}
par(opar) #restore device