Displaying 20 results from an estimated 140 matches similar to: "Permutations of configurations on multiple columns"
2000 Sep 26
1
Permutations
Hi,
this is maybe not a real R problem but I want to solve this in R ;-)
Consider the set of all permutations of 1:N (=: S, say) and a fixed
element a from S. I now need to compute the number of permutations s from
S which are elementwise less or equal to a: | { s \in S | s <= a } |
Of cource, backtracking using a tree structure is possible. Does anyone
know an efficient way?
Torsten
2007 May 30
0
manova permutations and pair-wise contrasts
Hi,
I have a function for doing permutation tests for Manovas, written
with the help of folks here on the list. It seems to work ok, and I've
found that there is indeed a significant difference among groups in my
analysis. I want to follow up on this by testing for which pairs of
groups are significantly different. Reasoning that since Wilks Lambda
is a generalization of the Hotelling T test,
2008 Jan 14
2
Permutations of variables in a dataframe
Hallo All,
I would like to apply a function to all permutations of variables in a
dataframe (except the first). What is the best way to achieve this?
I produce the permutations using:
nvar <- ncol(dat) - 1
perms <- as.matrix( expand.grid(rep( list(1:0) , nvar ))[ , nvar:1] )
Thanks in advance
Serguei
Test-dataframe, comma-delimited:
code,wav,w,area,gdp,def,pop,coast,milspend,agr
2009 Oct 10
1
permutations
Question 1.
I would calculate all the permutations of numbers (23,46,70,71,89)
How can I write correctly the code?
(Load gregmisc)
> permutations (..?...)
______________________
Question 2.
It's possible permute a string?
..for example:
EIGER
EGIER
EREGI
etc..etc..
Thanks,
E.
--
View this message in context: http://www.nabble.com/permutations-tp25834463p25834463.html
Sent from the R
2010 Jun 22
1
replication time series using permutations of the each "y" values
Dear All,
I'm trying to create this:
I've these data (a, b,c, etc. are numbers) :
1 a b
2 c d f
3 g
4 h
...
N
I'm trying to create the all "time series permutations" (length = N)
taking account
the possibilities for each value. For example (N=4),
1 a
2 c
3 g
4 h
next,
1 b
2 c
3 g
4 h
next
1 a
2 d
3 g
4 h
and so on. For this example, there are
2010 Jun 30
1
All possible permutations of letter A with other letters
Dear list,
I have a vector of letter strings as follow:
> LETTERS[c(1:7,9,15,18:25)]
[1] "A" "B" "C" "D" "E" "F" "G" "I" "O" "R" "S" "T" "U" "V" "W" "X" "Y"
I need to find sequences of length 11, which are made from all
2017 Jun 21
0
Permutations in RDA for repeated measures, using how()
Dear all,
I am using RDA to study plant communities in various land uses (variable LU with values M, U, etc.). For each land use, I sample 3 to 5 fields (M1, M2, U1, U2, etc). I make 5 measurements for both plant communities and environmental variables in each field.
I repeat the process every 6 months to study the effect of time and season (D16 for dry season 2017, R16 for rainy season 2016,
2006 Aug 02
2
listing of permutations
Dear R People:
Suppose I have the 4 numbers: 1,2,3,4.
I would like to create a listing of the permutations
of 4 items taken 4 at a time.
Is there a built in function for that, please?
Thanks in advance!
R 2-3-1 for Windows or Linux
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgess at gator.uhd.edu
2000 Dec 17
1
AW: Permutations
Niels Waller wrote:
> Does anyone know of an R (or S-PLUS) function for delineating all possible
> combinations and permutations?
The following function delivers all permutations of 1:n.
all.perm <- function(n) {
p <- matrix(1, ncol = 1)
for (i in 2:n) {
p <- pp <- cbind(p, i)
v <- c(1:i, 1:(i - 1))
for (j in 2:i) {
v <- v[-1]
2006 Aug 18
1
Permutations with replacement
Is there a simple function or process that will create a matrix of
permutations with replacement?
I know that using the combinat package
###### begin R code ######
> library(combinat)
> m <- t(array(unlist(permn(3)), dim = c(3, 6)))
# we can get the permutations, for example 3!=6
# gives us
> m
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 1 3 2
[3,] 3 1 2
[4,]
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
2010 Jan 19
1
restricted permutations in permtest()?
Hallo List,
I'm trying to implemement a restricted permutation scheme in permutest(). More
precisely I have dependence in my data that should be allowed for in the
permutation - I simulated the problem in the example of the vegan documentation
p.24:
library(vegan)
data(varespec)
## Bray-Curtis distances between samples
dis <- vegdist(varespec)
## First 16 sites grazed, remaining 8 sites
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
2008 Nov 24
3
Help With Permutations
I have a problem with permutations functions in R
I just started using R so maybe it is an easy question
I need to obtain all the 9.somthingExp 157 permutations that can be
given from the number from 1 to 100
I wrote the following commands:
> library(gregmisc)
>options(expressions=1e5)
cmat <- combinations(300,2)
dim(cmat) # 44850 by 2
>permutations(n=100, r=100)
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
2012 Oct 31
3
expand.grip for permutations
if i were to have a block size of 4 people and i want to assign a treatment
combination to the entire block, there would be 16 different treatment
combinations (TTTT, TTTP, TTPP, PTTP, etc.)
i am trying to get all 16 permutations and i am able to use this code below.
drugs=c('P','T');
comb=expand.grid(drugs,drugs,drugs,drugs)
for a block size of 3 the code would be
2010 Jan 14
2
Fixed size permutations
I'm using functions to return a matrix of all permutations of a
specified size from a larger list for predictor selection.
For each predictor size I use a seperate function like this:
bag2 <- function(n) {
rl <- c()
for (i1 in seq(n)) {
for (i2 in seq(n)) {
if (length(unique(c(i1,i2)))==1) {next}
rl <- cbind(rl,matrix(c(i1,i2)))
}
}
2017 Dec 08
0
Curiously short cycles in iterated permutations with the same seed
Hi Boris,
Do a search on "the order of elements of the symmetric group". (This search
will also turn up homework questions and solutions.) You will understand
why you are seeing this once you understand how a permutation is decomposed
into cycles and how the order relates to a partition of n (n=10 in your
case).
Enjoy!
Eric
On Fri, Dec 8, 2017 at 6:39 AM, Boris Steipe <boris.steipe
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
2010 Jan 18
2
permutations from vectors out of a matrix
Dear R-Users,
I'm relativley new to R and have the following problem. I need all
permutations of the vectors created by the collumns of a matrix. I will
give a small example:
p=3
n=2^p-1
#number of obtainable vectors
mat=matrix(0,p,p)
for(i in 1:p)
{
mat[i:1,i]=1/i
}
mat is now a