Questions tagged [pairwise]
273 questions
0
votes
0 answers
Pairwise combination of columns (permutations) of the jagged array in C#
I need your assistance and advice on pairwise combination of columns (permutations) of the jagged array in C#, to be more clear let me show an example:
Input array:
String[][] arr = {
new String[] {"A", "B", "C"},
…

YutuKAron
- 3
- 1
0
votes
1 answer
pairwise comparison formulas in R
I am new to R and need to do pairwise comparison formulas across a set of variables. The number of elements to be compared will by dynamic but here is a hardcoded example with 4 elements, each compared against the other:
#there are 4 choices A, B,…

Christopher Davis
- 85
- 2
0
votes
1 answer
R - Number of cases in 4-dimensional pairwise array
I'm making a "pairwise" array in R. Given the vector combo, I'm finding every permutation of 4 elements. Thus, a 4-dimensional "pairwise" array. My current approach is making it as a simple list, using nested sapply functions, like so:
fourList <-…

twieg
- 53
- 2
- 9
0
votes
0 answers
error in t(dat1) and pairwise not found errors in R
Can someone tell me why the Error in t(dat1) : object 'dat1' not found is appearing, and why Error in is.element("pairwise", names(x)) : object 'pwStats' not found is too?
I'm new to R, and I am trying to visualize the Djost graph shown here:…

Melanie Croft
- 1
- 2
0
votes
5 answers
Python 3: pairwise iterating through list
I am looking for a nice pythonian solution to read two elements out of a list in Python 3. What do I need to write for ??? in the following code:
it = [1,2,3,4,5,6]
for x, y in ??? :
print (x, y)
The desired output would be:
1 2
3 4
5 6
Also…

Marcel Sonderegger
- 772
- 1
- 8
- 21
0
votes
0 answers
Pairwise cosine similarity Python
I have to compute pairwise cosine similarity after computing tf-idf matrix but I am getting a memory error! found similar questions but the answers didn't solve my case.
Currently my code is ,
from sklearn.metrics.pairwise import…

sanjita
- 1
- 1
0
votes
1 answer
index of the residue matched using pairwise2 in biopython
I am interested in knowing the index of residues that match to a string using pairwise2 in python.
For example I have two strings
A:' EEEEE HHH HHH EEEEE'
and
B: 'EEE EEEE HHH'
using the following code:
from Bio…

kdba
- 433
- 5
- 13
0
votes
1 answer
Pairwise comparison inside array in Julia
Suppose we have a 6-element array in Julia, for example, Int64[1,1,2,3,3,4]. If we want to compare two arrays elementwise, we know we can use ".=="; but my goal is to do all the pairwise comparisons inside the above array: if the elements (i,j) of…

coolsv
- 781
- 5
- 16
0
votes
1 answer
R: Loop through data.frame in row-pairs
I would like to process some GPS-Data rows, pairwise.
For now, I am doing it in a normal for-loop but I'm sure there is a better and faster way.
n = 100
testdata <- as.data.frame(cbind(runif(n,1,10), runif(n,0,360), runif(n,14,16), runif(n,…

SeGa
- 9,454
- 3
- 31
- 70
0
votes
0 answers
Cannot get Repeated measures ANOVA in RStudio to work
I am trying to work out on how to conduct a repeated measures ANOVA. My data is structured as followed
means <- structure(list(col = c("c", "v1", "b1", "v2", "b2"),
`1` = c(8.55,9.73, 8.93, 9.52, 9.91),
`2` =…

rhavan
- 3
- 4
0
votes
1 answer
Pairwise calculations between raster layers from two different raster stacks
I have 2 raster stacks. I want to do some math between pairs of raster layers from each of the stacks, producing a 3rd raster stack of the same number of layers, ie;
r1<- raster stack 1 # 10 raster layers
r2<- raster stack 2 # 10 raster…

user2175481
- 147
- 1
- 8
0
votes
1 answer
Lsmeans producing identical p values when controlling for two other factors
Previously I have had no issues when using lsmeans to identify significant differences between groups while controlling for other factors using lme4 models. However, with the following dataset looking at fluoresence lsmeans produces identical p…

kris sales
- 3
- 1
0
votes
1 answer
Correlations and what brackets indicate
I have this code, from Julian Farawy's linear models book:
round(cor(seatpos[,-9]),2)
I am unsure what [,-9],2 is doing - could someone please assist?

K-Q
- 133
- 8
0
votes
1 answer
R: Evaluate function for all pairwise comparison of current observation and previous observations
Equation to be modeled in R
Structure of the Data
The variable gdp_pc_ppp corresponds to y in the equation. The variable gdp_pc_ppp is already sorted from the smallest to largest value. The variable world_pop_share corresponds to p in the equation.…

Talzzia
- 13
- 2
0
votes
4 answers
Pairwise loop through multiple vectors in R
What do I have in R?
The following vectors:
N <- c('a','b')
M <- c('x','y')
The goal.
While keeping the vectors intact (I do not wish to combine them into a matrix), I would like to call the elements of the vectors in the following pairwise…
user7943172