similar to: documentation for rank() (PR#7298)

Displaying 20 results from an estimated 20000 matches similar to: "documentation for rank() (PR#7298)"

2004 Jun 25
3
alternate rank method
Hi, I'm wondering if anyone can point me to a function that will allow me to do a ranking that treats ties differently than rank() provides for? I'd like a method that will assign to the elements of each tie group the largest rank. An example: For the vector 'v', I'd like the method to return 'rv' v: 1 2 3 3 3 4 5 5 6 7 rv: 1 2 5 5 5 6 8 8 9 10 Thanks,
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 > > >
2007 Aug 06
1
rank in decreasing order
Hi All, I want to give ranks to elements in a column so I used: total_list$field1.rank <- rank(total_list$field1,ties.method="min") But this gives me the rank in increasing order. How do I get the ranks in decreasing order? I know decreasing = FALSE is not a legal argument here. Thanks. Jiong The email message (and any attachments) is for the sole use of the intended recipient(s)
2010 Jan 08
2
A better way to Rank Data that considers "ties"
This will start off sounding very easy, but I think it will be very complicated. Let's say that I have a matrix, which shows the number of apples that each person in a group has. OriginalMatrix<-matrix(c(2,3,5,4,6),nrow=5,ncol=1,byrow=T,dimnames=list(c("Bob","Frank","Joe","Jim","David"),c("Apples"))) Apples Bob 2
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 =================================================================== ---
2004 Dec 01
2
rank in descending order?
Hi, Is there any simple solution to get ranks in descending order? Example, a <- c(10, 98, 98, 98, 99, 100) r <- rank(a, ties.method="average") produces 1 3 3 3 5 6 I would want this instead: 6 5 3 3 3 1 Note that reversing r doesn't work but in small examples. Thanks, -Jose -- jquesada at andrew.cmu.edu Research associate http://lsa.colorado.edu/~quesadaj Dept. of
2003 Sep 23
1
AW: Rank and extract data from a series
Hi, >I would like to rank a time-series of data, extract the top ten data items from this series, determine the >corresponding row numbers for each value in the sample, and take a mean of these *row numbers* (not the data). >I would like to do this in R, rather than pre-process the data on the UNIX command line if possible, as I need to >calculate other statistics for the series.
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
2009 Jun 04
4
order() with randomised order in ties?
Hi I want to use order() to get the order of a vector. But I would need a different behavior when ties occur: similar to the parameter ties.method = "random" in the rank() function, I would need to randomise the ties. Is this possible? Example: x <- rep(1:10, 2) order(x) [1] 1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20 order(x) [1] 1 11 2 12 3 13 4 14 5 15
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
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
2018 Jan 22
2
Inconsistent rank in qr()
Hi, I have noticed different rank values calculated by qr() depending on LAPACK parameter. When it is FALSE (default) a true rank is estimated and returned. Unfortunately, when LAPACK is set to TRUE, the min(nrow(A), ncol(A)) is returned which is only occasionally a true rank. Would not it be more consistent to replace the rank in the latter case by something based on the following pseudo code ?
2005 Oct 20
3
numerical issues in chisq.test(simulate=TRUE) (PR#8224)
Hi, This report deals with p-values coming from chisq.test using the simulate.p=TRUE option. The issue is numerical accuracy and was brought up in previous bug reports 3486 and 3896. The bug was considered fixed but apparently was only mostly fixed. Just the typical problem of two values that are mathematically equal not ending up numerically equivalent. Consider this series of three 2x2
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
2018 Jan 22
3
Inconsistent rank in qr()
Le 22/01/2018 ? 17:40, Keith O'Hara a ?crit?: > This behavior is noted in the qr documentation, no? > > rank - the rank of x as computed by the decomposition(*): always full rank in the LAPACK case. For a me a "full rank matrix" is a matrix the rank of which is indeed min(nrow(A), ncol(A)) but here the meaning of "always is full rank" is somewhat confusing. Does it
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 Jun 21
5
rank(x,y)?
Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same ordering, but the rank() function doesn't take multiple values as input. Is there a simple way to get what I want? E.g. > x <- c(1,2,3,4,1,2,3,4) > y <-
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
2012 Jan 27
3
Subsetting for the ten highest values by group in a dataframe
Hello, I am looking for a way to subset a data frame by choosing the top ten maximum values from that dataframe. As well this occurs within some factor levels. ## I've used plyr here but I'm not married to this approach require(plyr) ## I've created a data.frame with two groups and then a id variable (y) df <- data.frame(x=rnorm(400, mean=20), y=1:400,