Questions tagged [permute]

permute is an R package for generating restricted permutations. Its original intention was for use with the vegan package to analyse multivariate models for ecological data.

permute is an R package that generates permutations from restricted designs, such as permutations within blocks. permute allows the following designs

  • Randomisation (free permutation)
  • Cyclic shifts for line transects and time series
  • Toroidal shifts for spatial grids

These can be nested hierarchically with samples present at 3 levels:

  • Block: these are never permuted, only samples within blocks are permuted.
  • Plot: Plots lie within Blocks. Plots may further restrict permutation (i.e. the plots are not permuted) or they may be permuted using any of the above 3 permutation types.
  • Within-plot: these are the samples at the lowest level, the individual rows of the data. These may be held fixed (within any Plots and/or Blocks) or be permuted following one of the three methods above)

This hierarchy allows for the testing of complex designs, including split-plot experimental designs.

68 questions
0
votes
1 answer

Javascript display innerHTML on the same page

So I am testing the permute function of D3.js and it works just fine. The issue I am having is to display the results on the same page using innerHTML, it always reloads in order to display. I am probably missing a detail here, can someone…
Lango
  • 323
  • 5
  • 17
0
votes
2 answers

permute a column within a level, perform an test on 2 columns, and save the pvalues

I have a data frame > dput(df) structure(list(id = c(1, 2, 3, 4, 1, 2, 3, 4), level = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c("g01", "g02"), class = "factor"), m_col = c(1, 2, 3, 4, 11, 22, 33, 44), u_col = c(11, 12, 13,…
R-MASHup
  • 365
  • 2
  • 9
0
votes
1 answer

Permutation and Combination in PhP

I I want to compute the permutations 5p2, 5p3, 5p4 and 5p5 from the array [1,2,3,4,5] The function below only runs 5p5. To run 5p2, 5p3, 5p4 I will have to manually iterate through the array using a for...loop. Please help me. //function to return…
0
votes
1 answer

Permute features of 1d array in keras

I want to swap the features before I feed them to another layer. I have 4 variables so my input array is of size (#samples, 4) Let's say the features are: x1, x2, x3, x4 Excepted output: Swapping1: x4, x3, x2, x1 Swapping2: x2, x3, x2, x1 ….…
0
votes
1 answer

Permutation of array, but with known some values

I can create unique combinations with an array, but I can't set some fields as default. I've tried to change all permute and combinate functions. First of all i did echo if col2 equals "e" letter. But it is not the correct method. function…
Alper AKPINAR
  • 71
  • 3
  • 10
0
votes
2 answers

How to Print Possible permutations of the Array length in java

I'm working on task in which i have to show the possible permutations of the length of array. I've tried some tricks but it's still giving the list of many outputs, and in the end my project get crash. I've tried mathematically and i got answer…
Waqas Umer
  • 99
  • 2
  • 13
0
votes
1 answer

Permutations of 3 elements within 6 positions: one equal neighbour

Taking into account the answers in this post Permutations of 3 elements within 6 positions, I think it's worth to open a new discussion about how ordering the elements. The first condition was to have always sequences with alternate elements: # …
fina
  • 429
  • 4
  • 12
0
votes
2 answers

Combine all possible rows of data frame in R

I have the following data frame: x <- data.frame("Col1" = c('A', 'B', 'C', 'D'), "Col2" = c('W', 'X', 'Y', 'Z')) I want to have a new data frame with all possible combinations of row combinations, which would give a data frame that would have two…
ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39
0
votes
1 answer

R diagonal matrix error

I have the following type of dataframe A B C D 1 0 1 10 0 2 1 15 1 1 0 11 I would like the following output A B C D 1 0 1 10 1 1 0 11 0 2 1 15 I have tried this code …
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29
0
votes
2 answers

How to Increase matrix size by rows

The matrix row are to be increased. Row repetition is allowed and row sequence is not mandatory but expected. The new row size may or may not be divisible by original row size. A=[1 2 3; 4 5 6; 7 8 9] B=resize(A,9,3) This is to be increased to row…
user9003011
  • 306
  • 1
  • 10
0
votes
0 answers

How to take transpose of N-D array in matlab?

I am using the following code to get all the possible combinations of the rows of a matrix. function rComb(matrix) rows = size(matrix,1) for n = 1:rows rowsCell = num2cell(matrix,2); r = nchoosek(1:size(matrix,1),n); out =…
0
votes
1 answer

Permuting vector in Matlab

I have browsed in here for answers, but unsuccessful. I have code of the following type: matrix = [1, 2, 3]'; for start = 1:3 if start == 1 % nothing happens elseif start == 2 matrix =…
LenaH
  • 313
  • 2
  • 14
0
votes
2 answers

storing the permuted strings into an array

I have been trying to store the permuted strings from the following function into an array. I am getting the following error, Error 2 error C2106: '=' : left operand must be l-value I want to be able to store all the permuted string and…
Kiran JD
  • 521
  • 6
  • 15
0
votes
2 answers

What does this statement mean in MatLab

filename = 'SOMETHING'; eval(['load ' filename]); eval(['load ' filename '_vid1']) vid123=permute(vid,[2 1 3]); size(vid) eval(['load ' filename '_vid2']) vid123(:,:,(size(vid123,3)+1):(size(vid123,3)+size(vid,3)))=permute(vid,[2 1…
Anthony Ryan
  • 365
  • 2
  • 6
  • 19
0
votes
3 answers

How can generate rounds of permute

I want to build a soccer game and I must generate all rounds between teams. Then I have an array like this $array = array(1,2,3,4,5,6,7,8); How can generate all permute between elements without…