Displaying 20 results from an estimated 1249 matches for "permutes".
Did you mean:
permute
2013 May 11
1
How to repeat 2 functions in succession for 400 times? (microarray data)
Hi,
May be this helps:
?set.seed(24)
?mydata4<- as.data.frame(matrix(sample(1:100,10*38,replace=TRUE),ncol=38))
?dim(mydata4)
#[1] 10 38
?library(matrixStats)
res<-do.call(cbind,lapply(1:400, function(i) {permutation<-sample(mydata4); (rowMeans(permutation[,1:27])-rowMeans(permutation[,28:38]))/(rowSds(permutation[,1:27])+rowSds(permutation[,28:38]))} ))
?dim(res)
#[1]? 10 400
A.K.
2004 Jul 16
0
Permutations (summary)
Dear R users,
This is a second summary of the permutation problem I previously posted.
This summary restates the problem as well as the solution.
First of all thanks to everyone including Erich, Robin, Gabor, Christian,
Ingmar and others for your suggestions.
With the help of an off-list discussion with Gabor I?m going to summarize.
THE PROBLEM
We have 12 elements in blocks of 3 :
1 2
2004 Jul 13
12
Permutations
Dear R users,
I?m a beginner user of R and I?ve a problem with permutations that I don?t
know how to solve. I?ve 12 elements in blocks of 3 elements and I want only
to make permutations inter-blocks (no intra-blocks) (sorry if the
terminology is not accurate), something similar to:
1 2 3 | 4 5 6 | 7 8 9 | 10 11 12 ----------1st permutation
1 3 2 | 4 5 6 | 7 8 9 | 10 11 12 NO
- -
3 2 1
2004 Mar 10
3
aperm() and as.list() args to "["
Hi everyone.
I'm playing with aperm():
a <- 1:24
dim(a) <- c(2,3,2,2)
permutation <- c(1,2,4,3)
b <- aperm(a,permutation)
So if my understanding is right,
a[1,3,2,1] == b[c(1,3,2,1)[permutation] ]
but this isn't what I want because the RHS evaluates to a vector, and
I am trying to identify a single element of b.
How do I modify the RHS to give what I want?
Following
2018 May 23
3
find the permutation function of a sorting
Thanks, David.
I got the answer from the web.
Is there any easy way to permute a set (e.g., a set of characters) by the
permutation it returns? Thanks,
> x <- c(10,7,4,3,8,2)
> sort(x, index.return=TRUE)
$x
[1] 2 3 4 7 8 10
$ix
[1] 6 4 3 2 5 1
2018-05-23 10:49 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>
> > On May 22, 2018, at 10:06 PM, John
2007 Nov 16
4
Permutation of a distance matrix
Hi there,
I would like to find a more efficient way of permuting the rows and columns of a symmetrical matrix that represents ecological or actual distances between objects in space. The permutation is of the type used in a Mantel test.
Specifically, the permutation has to accomplish something like this:
Original matrix addresses:
a11 a12 a13
a21 a22 a23
a31 a32 a33
Example
2018 May 23
3
find the permutation function of a sorting
> sort(c("bc","ac","dd"), index.return=TRUE)
$x
[1] "ac" "bc" "dd"
$ix
[1] 2 1 3
We have the permutation, namely 1-->2, 2-->1, 3-->3.
How can I apply the permutation function to a new set
c("D","E", "F")?
so that the result is
c("E","D", "F").
2018-05-23 11:06
2008 Mar 18
6
[PATCH] permute with 2MB chunk
The memory permutation cause a slow down in case of a save/restore (bug
1143). It works better when the mixing is done with 2MB chunks.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
>
> Thanks, David.
> I got the answer from the web.
> Is there any easy way to permute a set (e.g., a set of characters) by the permutation it returns? Thanks,
>
>
> > x <- c(10,7,4,3,8,2)
> > sort(x, index.return=TRUE)
> $x
> [1] 2 3 4 7 8 10
>
> $ix
> [1] 6 4 3 2
2008 Apr 15
1
sign(<permutation>) in R ?
I am looking for an algorithm (written in R (preferably) or C,
but even pseudo-code in a text book maybe fine)
to determine the sign of a permutation.
What is that? Well, a permutation is either even or odd, the
sign is +1 or -1, respectively, see, e.g.,
http://en.wikipedia.org/wiki/Signature_of_a_permutation
which also says
>> In practice, in order to determine whether a given
2006 Oct 23
1
Lmer, heteroscedasticity and permutation, need help please
Hi everybody,
I'm trying to analyse a set of data with a non-normal response, 2 fixed
effects and 1 nested random effect with strong heteroscedasticity in the
model.
I planned to use the function lmer : lmer(resp~var1*var2 + (1|rand)) and
then use permutations based on the t-statistic given by lmer to get
p-values.
1/ Is it a correct way to obtain p-values for my variables ? (see below)
2009 Mar 14
2
permutations in R
Hi. Does anyone know of a function which will take as input a number n (or a
set of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no repeats.
For example if n is 3, I would want a function which I could use in a loop
and the first time
2009 Dec 18
2
Generating permutations that always include one specific element
Dear R community,
I am trying to create a matrix of permutations of a vector:
bands <- c("AL", "B", "DB", "DG", "G", "K", "LB", "LG", "MG", "O", "P",
"PI", "PK", "PU", "R", "V", "W", "Y")
Each permutation must be 4
2008 Apr 02
0
Exact Permutation test
R users,
Is it possible to do 'exact' permutation tests in R? If I run a perm.test or
permutation.test.discrete on a data set that has, for example, 720 possible
permutations, will that test permute ALL of those possible permutations, or
will it just permute 720 random permutations (thus allowing some
possibilities to repeat and some not to be permuted at all)?
I'm a little confused
2011 Jan 24
2
Masking commands - Permutation in gregmisc and e1071
I am using the function permutations from the package *gregmisc*. However, I
am also making use of the package *e1071*, which also contains a function
called permutations. I want to use the function permutations from the *
gregmisc* package, however, the other package is masking this function. This
happens both when I load the *e1071* package before *gregmisc* and when I
load *e1071* after I load
2018 May 23
2
find the permutation function of a sorting
Hi,
Is there any way to find the permutation function of the sorting and to
apply the function (or its inverse) elsewhere?
For example, the following permutation function from the sorting in the
matrix form is
c(1,2,3), c(2,1,3)
> sort(c("bc","ac","dd"))
[1] "ac" "bc" "dd"
I try to find it in the permutations/permute
2010 Jan 28
2
Constrained vector permutation
...oes not work because of the 4 in the first position. The vector
x.bad2 <- c(2,6,5,3,4)
does not work because of the 6 in the second position.
Does anyone know of a pre-made function to permute a vector under such a
constrain? Or perhaps a clever way to somehow use a function (e.g. ---)
that permutes a contingency table constrained by the marginals?
If such possibilities are not out there, what about this idea:
Assume the given vector already complies with the constraint (e.g. x <-
2:6).
First "cut" the vector (like cutting a deck of cards) at some random (given
condition*) posi...
2008 Nov 14
1
Generating unique permutations of a vector
Hi all,
I try to generate sets of strategies that contain probability
distributions for a defined number of elements, e.g. imagine an
animal that can produce 5 different types of offspring and I want to
figure out which percentage of each type it should produce in order to
maximize its fitness. In order to do so, I need to calculate the fitness
for all potential strategies. As an example, if I
2009 Aug 14
1
Permutation test and R2 problem
Hi,
I have optimized the shrinkage parameter (GCV)for ridge and got my r2
value is 70% . to check the sensitivity of the result, I did permutation
test. I permuted the response vector and run for 1000 times and draw a
distribution. But now, I get r2 values highest 98% and some of them more
than 70 %. Is it expected from such type of test?
*I was under impression that, r2 with real data set
2002 Jan 16
2
exhaustive permutations
Hello R-help Readers
I'm currently in the process of trying to write a permutation test
procedure for looking at differences between groups with a multivariate
data set (something equivalent to ANOSIM - analaysis of similarities for
those familiar with this test). As with other permutation tests, for
cases where there are large numbers of possible permutations, randomly
sampling from these