similar to: How to apply a function to a multidimensional array, based on its indices

Displaying 20 results from an estimated 400 matches similar to: "How to apply a function to a multidimensional array, based on its indices"

2012 May 14
3
How to apply a function to a multidimensional array based on its indices
Hello. I have a 4 dimensional array and I want to fill in the slots with values which are a function of the inputs. Through searching the forums here I found that the function "outer" is helpful for 2x2 matrices but cannot be applied to general multidimensional arrays. Is there anything which can achieve, more efficiently than the following code, the job I want? K <-
2012 Jan 30
1
Quantum scalar i40 tape partitions
Hi All, I have a Quantum scalar i40 tape library. I need to configure it to TWO tape partition libraries, e.g., library_a and library_b, so that each library has its own tape drive. Then connect this physical tape library to two different CentOS servers so that each server can see its own media changer and tape drive. I once had a successful configuration on one host but NOT on the other. One
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
Hi, I'm still not quite there with my H-F (G-G) correction code. I have it working for the main effects, but I just can't figure out how to do it for the effect interactions. The thing I really don't know (and can't find anything about) is how to calculate the covariance matrix for the interaction between the two (or even n) main factors. I've looked through some books
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
Hi, I'm still not quite there with my H-F (G-G) correction code. I have it working for the main effects, but I just can't figure out how to do it for the effect interactions. The thing I really don't know (and can't find anything about) is how to calculate the covariance matrix for the interaction between the two (or even n) main factors. I've looked through some books
2004 Nov 25
4
Avoiding for-loops
Hello R-users, I have a symmetric matrix of numerical values and I want to obtain those values in the upper or lower triangle of the matrix in a vector. I tried to do the job by using two for-loops but it doens't seem to be a clever way, and I'd like to know a more efficient code for a large matrix of thousands of rows and columns. Below is my code for your reference. Thanks a lot.
2010 Nov 07
1
How do I order xyplot line points?
I have the following xyplot figure: http://img577.imageshack.us/img577/686/filesizeresults12000000.png The data are organized in a matrix file as follows: Type Elements Chromosome Time bedGz 12000000 chr1 14.240 bedGz 12000000 chr2 7.949 bedGz 12000000 chr3 5.103 bedGz 12000000 chr4 5.290 bedGz 12000000 chr5 5.161 ... The x-axis labels in the Chromosome column are ordered
2013 Jun 14
1
IMAP MOVE and lazy_expunge_only_last_instance
Hello! im testing lazy_expunge_only_last_instance here and it seems it works wrong with IMAP MOVE IN: 14 uid move 13 "INBOX" OUT: * OK [COPYUID 1188569061 13 34] Moved UIDs. * 5 EXPUNGE 14 OK Move completed. dovecot.log: 2013-06-14 10:56:06 imap(test13 at mtx.ru): Info: copy from Test: box=INBOX, uid=34, msgid=<1294858169.32435.3.camel at int.office.matrix>, size=996,
2004 Jan 22
1
Re: matrix exponential: M0
H i, all! First of all, I'd like to apologize for my poor English. It's for years I don't use it. This is a R-version of a function I wrote a long ago for my HP48 calculator. It works with the binary expression of the power and just need to duplicate the mem used by X. Hope this helps. mtx.exp<-function(X,n) #Function to calculate the n-th power of a matrix X; { phi <-
2007 Nov 16
1
Efficient way to compute power of a sparse matrix
Dear all, I would like to compute power of a square non symmetric matrix. This is a part of a simulation study. Matrices are quite large (e.g., 900 by 900), and contains many 0 (more than 99 %). I have try the function mtx.exp of the Biodem package: library(Biodem) m <- matrix(0, 900, 900) i <- sample(1:900, 3000, replace = T) j <- sample(1:900, 3000, replace = T) for(x in 1:3000)
2011 Jan 26
0
Fwd: MAtrix addressing
Begin forwarded message: > From: David Winsemius <dwinsemius at comcast.net> > Date: January 26, 2011 8:32:30 AM EST > To: Alaios <alaios at yahoo.com> > Subject: Re: [R] MAtrix addressing > > > On Jan 26, 2011, at 7:58 AM, Alaios wrote: > >> Unfortunately right now is convoluted... by I was trying to find >> some solution. >> Bring again
2005 Feb 18
1
Two-factorial Huynh-Feldt-Test
Hi, I'm currently working on porting some SAS scripts to R, and hence need to do the same calculation (and get the same results) as SAS in order to make the transition easier for users of the script. In the script, I'm dealing with a two-factorial repeated-measures anova. I'll try to give you a short overview of the setup: - two between-cell factors: facBetweenROI (numbering
2008 Mar 13
3
Overland Arcvault 12 and sequential/random settings
My unit's firmware: library 05.03, tape d22h, shows the device as set to random mode. But mtx -f /dev/st0 status gives an error that google says the device is in sequential mode. dmesg|grep -i hp does reflect CentOS thinks the device is a sequential unit. I've tried this with Fedora 8, too, and both show the same, so it is either an issue with CentOS/Fedora RPMs, or the version of
2004 Nov 02
3
n-th power of a matrix
Hello all, To calculate the power of a matrix, I used the command "mtx.exp(X, n)", but there is an error saying "Error: couldn't find function "mtx.exp"". How can I deal with this problem? Jing
2005 Aug 31
1
Building bacula RPM from Karanbir's repo
Hi all, Has anyone tried to rebuild bacula from the source RPM provided on Karanbir's CentOS yum repo? Every time I give it a go, I'm given this error during the configure stage: checking host system type... configure: error: can not guess host type; you must specify one make[1]: Entering directory `/home/rpmbuilder/rpmbuild/BUILD/depkgs/mtx-1.2.17kes' make[1]: *** No targets
2011 Jan 17
0
dsync crash
Hello! I'm converting mailboxes from maildirs to mdbox and dsync crashes on two of them /var/mail-nfs-1 - nfs mount /var/mail-nfs-indexes - local fs /usr/bin/dsync -f -u user at site.ru mirror mdbox:/var/mail-nfs-1/mail/site.ru/user/mail:INDEX=/var/mail-nfs-indexes/site.ru/user dsync(user at site.ru): Panic: file istream-limit.c: line 79 (i_stream_limit_seek): assertion failed: (v_offset
2005 May 19
14
R annoyances
Dear R Folks, I'm a big fan of R, but there are a couple of things that repeatedly annoy me, and I wondered if anyone has neat ways to deal with them. (a) When using "apply" row-wise to a matrix, it returns the results column-wise, and to preserve the original orientation, I've to do a transpose. E.g. I've to keep doing a transpose, which I consider to be quite
2011 Aug 16
1
how to sort the levels of a table
Dear colleagues, I have really heavy problems in sorting the results of a table according to certain features of the levels in the table. Prerequisites: It all starts with a fairly simple data set, which stores observations of 21 observers (horizontally from 1 to 21; 21 is reference/goldstandard) who diagnosed 42 videos (vertically from 1 to 42). See dump of R-object "input" below in
2009 Feb 24
3
Polycom Spectralink 8002 Configuration
I have a new Polycom Spectralink 8002 and am having trouble with the configuration or the unit but I can't see what's wrong. The unit does not seem to even attempt to register with the Asterisk proxy but I can make calls to it. I have viewed the syslog from the device which it will actually write to the asterisk server so I know it can be reached. I have also run a sip debug and
2001 Aug 15
2
FORTRAN in R
Hi, Can anyone tell me what might cause this error message? Error in .Fortran("swallocate", as.double(mtx), as.double(wt), as.integer(n), : C/Fortran function name not in load table This occurs when I copied the Splus stepwise() function into R. I can source into R fine, but when I need to call that function on some dataset, I got the above error message. Platform
2012 Aug 10
3
Vector size limit for table() in R-2.15.1
Hi, First, thanks in advance. Some useful info: >version platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu version.string R version 2.15.1 (2012-06-22) I'm trying to use the table() function on a 2 column matrix that has 711 million rows (see below). However, it freezes. If I subset the matrix to be less than or equal