similar to: rank(x,y)?

Displaying 20 results from an estimated 30000 matches similar to: "rank(x,y)?"

2015 Oct 08
3
rank(, ties.method="last")
Hi, I ran into a problem where I actually need rank(, ties.method="last"). It would be great to have this feature in base and it's also simple to get (see below). Thanks & cheers, Marius rank2 <- function (x, na.last = TRUE, ties.method = c("average", "first", "last", # new "last" "random", "max",
2015 Oct 21
2
rank(, ties.method="last")
Marius Hofert-4------------------------------ > Den 2015-10-09 kl. 12:14, skrev Martin Maechler: > I think so: the code above doesn't seem to do the right thing. Consider > the following example: > > > x <- c(1, 1, 2, 3) > > rank2(x, ties.method = "last") > [1] 1 2 4 3 > > That doesn't look right to me -- I had expected > > >
2015 Oct 22
1
(no subject)
------------------ >>>>> Henric Winell <[hidden email]> >>>>> on Wed, 21 Oct 2015 13:43:02 +0200 writes: > Den 2015-10-21 kl. 07:24, skrev Suharto Anggono Suharto Anggono via R-devel: >> Marius Hofert-4------------------------------ >>> Den 2015-10-09 kl. 12:14, skrev Martin Maechler: >>> I think so: the code above
2011 Apr 12
2
The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?
I have a question concerning the Wilcoxon signed-rank test, and specifically, which R subroutine I should use for my particular dataset. There are three different commands in R (that I'm aware of) that calculate the Wilcoxon signed-rank test; wilcox.test, wilcox.exact, and wilcoxsign_test. When I run the three commands on the same dataset, I get different p-values. I'm hoping that
2012 Jun 01
3
Add rank column to data frame as in SQL...
Hopefully this is an easy problem... I'm trying to add a partitioned rank column to a data frame where the rank is calculated separately across a partition by categories, the way you could easily do in SQL. I found this solution in the archives that looked like it might work: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/8675.html The example has a data frame with several car companies,
2017 Aug 24
1
[patch] Fix typo in 'rank' documentation
I noticed a typo in the documentation for the 'rank' function. Specifically, it describes ties.method="first" and contrasts with... ties.method="first", when it should be ties.method="last". Thanks, Jon -------------- next part -------------- Index: src/library/base/man/rank.Rd =================================================================== ---
2002 Mar 26
3
ks.test - continuous vs discrete
I frequently want to test for differences between animal size frequency distributions. The obvious test (I think) to use is the Kolmogorov-Smirnov two sample test (provided in R as the function ks.test in package ctest). The KS test is for continuous variables and this obviously includes length, weight etc. However, limitations in measuring (e.g length to the nearest cm/mm, weight to the nearest
2006 Aug 25
1
exact Wilcoxon signed rank test with ties and the "no longer under development" exactRanksumTests package
Dear List, after updating the exactRanksumTests package I receive a warning that the package is not developed any further and that one should consider the coin package. I don't find the signed rank test in the coin package, only the Wilcoxon Mann Whitney U-Test. I only found a signed rank test in the stats package (wilcox.test) which is able to calculate the exact pvalues but unfortunately
2007 Jul 12
5
Compute rank within factor groups
Hi, I have a data.frame which is ordered by score, and has a factor column: Browse[1]> wc[c("report","score")] report score 9 ADEA 0.96 8 ADEA 0.90 11 Asylum_FED9 0.86 3 ADEA 0.75 14 Asylum_FED9 0.60 5 ADEA 0.56 13 Asylum_FED9 0.51 16 Asylum_FED9 0.51 2 ADEA 0.42 7 ADEA 0.31 17
2004 Mar 30
4
rank() vs SAS proc rank
SAS proc rank has ties options of high and low that would allow producing ranks of the type found in the sports pages, e.g., rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7 Could R support these ties.methods?
2006 Oct 27
1
What to do with a inconsistency in rank() that's in S+ and R ever since?
Dear R-developers, I just realized that rank() behaves inconsistent if combining one of na.last in {TRUE|FALSE} with a ties.method in {"average"|"random"|"max"|"min"}. The documentation suggests that e.g. with na.last=TRUE NAs are treated like the last (=highest) value, which obviously is not the case: > rank(c(1,2,2,NA,NA), na.last = TRUE, ties.method
2003 Sep 11
1
rank(*) with NAs -- new option "keep" desired
In some contexts, I find the current behavior of rank() very `suboptimal'. We have the argument na.last = {TRUE | FALSE | NA } where the first two cases treating NAs (almost) as if they were == +Inf or == -Inf whereas the 3rd case just drops NAs. For the typical ``Rank Transformation'' that is recommended in EDA in several contexts, I would however want something else, namely keep
2004 Oct 21
3
documentation for rank() (PR#7298)
Full_Name: Doug Grove Version: R.1.9.1 OS: Linux Submission from: (NULL) (140.107.156.61) I just found that rank() has a 'decreasing' argument that is not documented in its help page. I checked my version of 2.0.0 (original release hence unpatched) and it is not documented there. For curiousity I also went back to version 1.8.1 and checked the function (not the documentation)and at
2012 Nov 21
1
I don't know the difference between rank and order
I don't know the difference between rank and order.For example: > x=c(10,30,30,20,10,20) > x[rank(x,ties.method="first")] [1] 10 10 20 30 30 20 > x[order(x)] [1] 10 10 20 20 30 30 the result is quite different, x[rank(x,ties.method="first")] [1] 10 10 20 30 30 20 It is not sorted,why? -- View this message in context:
2010 Feb 22
2
Siegel-Tukey test for equal variability (code)
Hi, I recently ran into the problem that I needed a Siegel-Tukey test for equal variability based on ranks. Maybe there is a package that has it implemented, but I could not find it. So I programmed an R function to do it. The Siegel-Tukey test requires to recode the ranks so that they express variability rather than ascending order. This is essentially what the code further below does. After the
2007 Jan 11
1
rank function and NA in 2.3.1
Hi. I am using R 2.3.1 on WIndows XP, and I am having trouble with the rank function in the presence of numerical NA data. I want the NA's all to get the same rank, but they don't. Here is an example from my session: >ct_align_rets_f2$liq[6851:6859] [1] 115396 NA 362595 NA 242986 340805 NA 692905 251533
2004 Apr 20
2
Rank - Descending order
Dear All, Is there any simple way to way to produce "rank", for a given list, but in a descending order? E.G: x = list(a=c(1,5,2,4)); rank(x$a); produces 1,4,2,3 However I am looking for a way to generate (4,1,3,2). It would be particularly nice if the proposed solution has all the niceties of rank function (like NA handling and ties.method functionality) TIA Manoj
2003 Dec 01
2
wilcoxon-pratt signed rank test in R - drug-effiacy
Hi. I'm going to introduce the R-package for a group of medical doctors later this week and is a little confused about there use of a test named "willcoxon-pratt" for testing if the clinical and biochemical markers has decreased significantly after the use of some drugs for a group of patients. Looking into the R-functions I would in R recommand using a matched-pairs Wilcoxon
2004 Mar 15
1
spearman rank correlation problem
Hello R gurus, I want to calculate the Spearman rho between two ranked lists. I am getting results with cor.test that differ in comparison to my own spearman function: > my.spearman function(l1, l2) { if(length(l1) != length(l2)) stop("lists must have same length") r1 <- rank(l1) r2 <- rank(l2) dsq <- sapply(r1-r2,function(x) x^2) 1 - ((6 * sum(dsq))
2011 Aug 24
1
Function rank() for data frames (or multiple vectors)?
Hello, I'd like to rank rows of a data frame similar to what rank() does for vectors. However, ties should be broken by columns that I specify. If it is not possible to break a ties (because the row data is essentially the same), I'd like to have the same flexibility that rank() offers. Is there an elegant solution to this simple problem in R? Basically, what I need is a mixture of