similar to: calculations on diagonals of a matrix

Displaying 20 results from an estimated 1000 matches similar to: "calculations on diagonals of a matrix"

2009 Jul 23
2
Constructing lists (yet, again)
This is an attempt to rescue an old R-help question that apparently received no response from the oblivion of collective silence, and besides I'm also curious about the answer > From: Griffith Feeney (gfeeney at hawaii.edu) > Date: Fri 28 Jan 2000 - 07:48:45 EST wrote (to R-help) > Constructing lists with > > list(name1=name1, name2=name2, ...) > > is tedious when
2003 Apr 02
1
Can boot return matrix?
Dear All, I have a function which takes a n x m matrix as an argument and returns an n x n matrix. I want to take bootstrap samples form the input matrix in the way as each row represent a multivariate 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
2000 Oct 17
5
R for Debian 2.2
I've recently installed Debian/GNU Linux 2.2. The R package on the debian website and Official CD is 0.90.x, so I checked cran for a more recent deb package, with the following result. homebrew:~# apt-get install r-base Reading Package Lists... Done Building Dependency Tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you
2007 Apr 14
6
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >> I'm definitely interested in improving coalescing and it sounds like >> this would fall under that work. Do you have references to papers >> that talk about the various algorithms? > > Some suggestions: > > @InProceedings{Budimlic02, > AUTHOR = {Zoran Budimlic and Keith D. Cooper and Timothy
2010 Apr 10
1
minimization function
Hi all, I am trying to minimize the quardratic form w'Aw, with certain constraints. In particular, (1) A=(a_{ij}) is n by n matrix and it is symmetric positive definite, a_{ii}=1 for all i; and 0<a_{ij}<1 for i not equal j. (2) w'1=n; (3) w_{i}>=0 Analytically, for n=2, it is easy to come up with a result. For larger n, it seems difficult to obtain
2000 Feb 02
1
"Use a command like x <- vi() to recover"
Subject command doesn't work with rw0901 running on win95 (of course) so, after looking at the vi and emacs code, I put textpad <- function(name = NULL, file = ""){ edit(name, file, editor = "g:\\textpad\\txtpad32.exe") } Now x <- textpad() brings up the botched code in the textpad editor, as expected, but when I try to save changes I get an "Access to
2012 May 23
1
numerical integration
Greetings, Sorry, the last message was sent by mistake! Here it is again: I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix
2010 Sep 21
1
Creating table from data frame
Hey, I have a dataset where two columns are factors and another column consists of values. Each combination of factors can only have a single value assigned to it. I'd like to represent this as a matrix or table where the rows are the first column factors and the columns the second column factors. So that each cell a_ij in the matrix represents the associated value for the factor combination
2000 Aug 19
1
Exporting graphics to PS or EPS
On Fri, 18 Aug 2000 07:49:44 +0100, Brian D Ripley <ripley at stats.ox.ac.uk> wrote: >On Thu, 17 Aug 2000, Paul E Johnson wrote: >> My experience is that, if I output a gif that does not >> fit on the page, then I've shot myself in the foot because resizing the >> graph makes all the text in it too small. I don't think postscript is >> immune to this
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 be waiting until
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. Best regards, Magnus
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
On 3 May 2018, at 22:09, David Zarzycki via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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
2007 Jul 31
3
Nonlinear optimization with constraints
Hello R community, I am using R for creating a model using optimization. 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)
2007 Nov 15
5
Multiply each column of array by vector component
Hi, I've got an array, say with i,jth entry = A_ij, and a vector, say with jth entry= v_j. I would like to multiply each column of the array by the corresponding vector component, i,e. find the array with i,jth entry A_ij * v_j This seems so basic but I can't figure out how to do it without a loop. Any suggestions? Michal.
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
2011 Jul 19
3
calculating the mean of a random matrix (by row) and some general questions
Hi everyone! I'm trying to teach myself R in order to do some data analysis. I'm a mathematics student and (only) familiar with matlab and latex. I'm working trough the "official" introduction to R at the moment, while simultaneously solving some exercises I found in the web. Before I post my (probably stupid) question, I'd like to ask you for some general advice. How do
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 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
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.... Easy Example: G= 2 3 4