correspondence

Find value corresponding to maximum in other column [duplicate]

时光毁灭记忆、已成空白 提交于 2020-01-30 10:32:25
问题 This question already has answers here : Finding row index containing maximum value using R (3 answers) Closed 2 years ago . I have a data frame similar to as follows: x <- c(1, 2, 3, 4, 5) y <- c(1, 2, 3, 2, 1) df <- data.frame(x, y) I want to find the value of x when y is at its maximum. I know that I can find the max of y with this: max(df$y) But I don't know how to match it, and I think there's probably a better way. 回答1: Using dplyr : # install.packages(dplyr) library(dplyr) df %>%

Can't run correspondence analysis on two-way contingency table using FactoMineR

筅森魡賤 提交于 2019-12-31 03:15:11
问题 It does not appear to work on this table, named mytable: 0 1 2 3 4 5 7 Click_No 242854 91661 102 21 65 51 291 Click_Yes 48274 20785 14 2 19 4 146 However, it works on this table: 0 1 2 3 4 5 7 Row1 4 0 0 0 0 0 11 Row2 35 2 0 0 0 0 0 Row3 18364 14 0 0 0 0 0 Row4 13 0 0 0 0 0 7 Row5 1497 1521 6 0 0 0 0 Row6 686 2 0 0 0 0 393 Row7 270167 110512 110 23 84 54 0 Row8 1 0 0 0 0 0 26 Row9 361 395 0 0 0 1 0 I used the FactoMineR function: res.ca <- CA(mytable) Does CA not work on specific types of

Sift implementation in Opencv 2.4.6 ubuntu

假装没事ソ 提交于 2019-12-11 23:25:47
问题 I am trying to compute correspondence between 2 images and am actually interested in the number of correspondence points, rather than the correspondence themselves, so that I can sue it to get the best match image. This is my following code : #include<iostream> #include<vector> #include<string> #include "cv.h" #include "highgui.h" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/legacy/legacy.hpp" #include "opencv2/objdetect/objdetect.hpp"