Displaying 20 results from an estimated 1000 matches similar to: "Fwd: MAtrix addressing"
2011 Jan 25
0
Map an Area to another
Dear All,
I would like to ask you help with the following:
Assume that I have an area of 36 cells (or sub-areas)
sr<-matrix(data=seq(from=1,to=36),nrow=6,ncol=6,byrow=TRUE)
> sr
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1 2 3 4 5 6
[2,] 7 8 9 10 11 12
[3,] 13 14 15 16 17 18
[4,] 19 20 21 22 23 24
[5,] 25 26 27 28 29 30
[6,]
2012 May 15
0
How to apply a function to a multidimensional array, based on its indices
Hello,
Your way is much better than to mess with the dim attribute, like I did.
But,
"If you can create a data.frame or matrix that has the indices"
Actually, it must be a matrix, indices can't be of type list.
A way to avoid loops/apply altogether, and much faster, is the one
creating K3
(K is the result from the op.)
n <- 20
t2 <- system.time({
K2 <-
2018 Apr 20
1
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 1:22 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
>
>> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote:
>>
>> Hi All,
>>
>> I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
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
2011 Dec 06
1
help wrapping findInterval into a function
Dear R Community,
I hope you might be able to assist with a small problem creating a function.
I am working with water-quality data sets that contain the concentration of
many different elements in water samples. I need to assign quality-control
flags to values that fall into various concentration ranges. Rather than a
web of nested if statements, I am employing the findInterval function to
2016 Aug 04
1
findInterval(all.inside=TRUE) for degenerate 'vec' arguments
What should findInterval(x,vec,all.inside=TRUE) return when length(vec)<=1,
so there are no inside intervals?
R-3.3.0 gives a decreasing map of x->output when length(vec)==1 and -1's
when length(vec)==0. Would '0' in all those cases be better?
> findInterval(x=c(10, 11, 12), vec=11, all.inside=TRUE,
rightmost.closed=FALSE, left.open=FALSE)
[1] 1 0 0
>
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.
2024 Sep 17
1
findInterval
>>>>> Gabor Grothendieck
>>>>> on Mon, 16 Sep 2024 11:21:55 -0400 writes:
> Suppose we have `dat` shown below and we want to find the the `y` value
> corresponding to the last value in `x` equal to the corresponding component
> of `seek` and we wish to return an output the same length as `seek` using
> `findInterval` to perform the
2024 Sep 16
1
findInterval
Suppose we have `dat` shown below and we want to find the the `y` value
corresponding to the last value in `x` equal to the corresponding component
of `seek` and we wish to return an output the same length as `seek` using
`findInterval` to perform the search. This returns the correct result:
dat <- data.frame(x = c(2, 2, 3, 4, 4, 4),
y = c(37, 12, 19, 30, 6, 15),
seek = 1:6)
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)
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
2020 Mar 06
0
findInterval Documentation Suggestion
>>>>> brodie gaslam via R-devel
>>>>> on Thu, 5 Mar 2020 22:18:33 +0000 (UTC) writes:
> I've found over time that R documentation that comes off as terse at
> first blush is usually revealed to be precise, concise, and complete
> on close reading.? I'm sure this is also true of `?findInterval`, but
> for whatever reason my
2018 Apr 19
0
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote:
>
> Hi All,
>
> I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
>
> pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA
> cat.pfoa[pfas.pheno$log2pfoa
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
2010 Jul 12
2
findInterval and data resolution
Hello Wise Ones...
I need a clever way around a problem with findInterval. Consider:
vec1 <- 1:10
vec2 <- seq(1, 10, by = 0.1)
x1 <- c(2:3)
a1 <- findInterval(x1, vec1); a1 # example 1
a2 <- findInterval(x1, vec2); a2 # example 2
In the problem I'm working on, vec* may be either integer or numeric, like
vec1 and vec2. I need to remove one or more sections of this vector;