Displaying 5 results from an estimated 5 matches for "a_ij".
Did you mean:
a_i
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.
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 array whose columns are diagonals of the given array and then cumulate
down columns. Is there a similar operator in R, or is there another/better way?
-.-.-.-.-.-.-.-.-.-.-...
2011 Apr 19
2
Data frame with 3 columns to matrix
...z
1 1.00 5 0.5
2 1.02 5 0.7
3 1.04 7 0.1
4 1.06 9 0.4
x and y columns are sorted and the values not necessarily integers. z
values are not sorted. Now I would like to create a matrix out of this
with x as first column values and y as first row values. Matrix element
a_11 shall be left NA. The a_ij should have the z value for the
corresponding x and y pair. The result shall be some sort of a grid and
then e.g. look like:
[,1] [,2] [,3] [,4] [,5]
[1,] NA 5 6 7 9 (y)
[2,] 1.00 0.5 NA NA NA
[3,] 1.02 0.7 NA NA NA
[4,] 1.04 NA NA 0.1 NA
[5,] 1.06 NA N...
2010 Sep 21
1
Creating table from data frame
...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 ij.
When no such value exists for the combination the value should be 0.
I've tried playing around with tables to get this to work, but I can't seem
to get it right. I've also had little luck when trying to find a...
2009 Jan 12
1
re tail case-pack ordering problem - can R help?
I'm a programmer, not a mathmatician. I heard about R, and I'm wondering if
anyone can tell me if there is an existing R function that can help with a
problem we're currently trying to find an algorithm for. If R is not the
answer, but you can recommend a known algorithm, that would help a lot!
I'm on a project in a retail corporation, working on a program to assist
retail buyers