Displaying 13 results from an estimated 13 matches for "rank2".
Did you mean:
rank
2011 Sep 26
2
merger two 3-d scatter plot
Dear R groups:
I have the data as follows, I want to plot the "Rank1 ~ obs30*Cases" and
"Rank2 ~ obs30*Cases" on the same plot as one 3-D scatter plot, how to do
that? Any help is highly appreciated.
ID obs30 Cases RANK1 RANK2
1 0.03175 63 82 81
2 0.00000 34 1 34
3 0.00000 36 2 41
4 0.00000 54 3 26
5 0.00000 22 4 42
6 0.00746 134 39 32
7 0.00000 2 5 53
8 0.01190 168 46 31
9 0.03012 166...
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", "min"))
{
nas <- is.na(x)
nm <- names(x)
ties.method <- match.arg(ties.method)
if (is.facto...
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
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
>
> > rev(sort.list(x, decreasing = TRUE))
> [1] 2 1 3 4
>
Indeed, well spotted, that seems to be correct.
>
> Henric Winell
>
------------------------------...
2006 Apr 23
2
Reorganizing rows and columns
...1 2
7 1 3
5 2 1
7 2 2
9 2 3
[[2]]
Doc Query Rank
4 1 1
5 1 2
9 1 3
8 2 1
5 2 2
7 2 3
I need to rearrange the data so that it is sorted by Query and Document,
with columns for rank1 and rank2 (from files 1 and 2, respectively). For
example:
[[1]]
Doc Query Rank1 Rank1
4 1 NA 1
5 1 1 2
7 1 3 NA
9 1 2 3
5 2 1 2
7 2 2 3
8 2 NA 1
9 2 3 NA
My goal is to perfor...
2006 Sep 19
2
looking for some functions to analyze a data set.
Hi R-users
I have a data set. There are 10 products and the numbers of people who
ranked the products.
The format of the data set is
productID rank1 rank2 rank3 rank4 rank5 rank6 rank7 rank8 rank9 rank10
-------------------------------------------------------------------------------------------------------
1 10
2 3
3 6
4 2
5 24
6 8
7 3...
2015 Oct 22
1
(no subject)
...----------------
>>> 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
>>>
>>> > rev(sort.list(x, decreasing = TRUE))
>>> [1] 2 1 3 4
>>>
>>
>> I...
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,
2015 Oct 20
0
rank(, ties.method="last")
...ue, Oct 20, 2015 at 10:26 AM, Henric Winell
<nilsson.henric at gmail.com> wrote:
> 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
>
> > rev(sort.list(x, decreasing = TRUE))
> [1] 2 1 3 4
>
Indeed, well spotted, that seems to be correct.
>
> Henric Winell
>
2009 Nov 04
0
Correlation of ranks of labels?
Hi,
I have two ranks of labels (strings) representing user preferences of colors.
For instance, here is a simple example with 4 preferences for each user:
> rank1
[1] "red" "blue" "green" "black"
> rank2
[1] "white" "gray" "black" "blue"
How can I compute Kendall's Tau for this scenario?
Thanks in advance,
--
S?rgio Nunes
2012 Apr 22
1
Transform dataframe
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120422/bb638d28/attachment.pl>
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 <-
2007 Aug 11
0
DOE and interaction plot general question
...frame by the combined rank of Res1 & Res2, but
> > where weigths are assigned to the importeance av each column. Lets
> assume
> > that Res1 is twice as important and lower values rank better.
> >
> > MyRanks<-data.frame
> (Rank1=rank(MyFrame[,"Res1"]),Rank2=rank(MyFrame[,"Res2"]),CombR=2*rank(MyFrame[,"Res1"])+rank(MyFrame[,"Res2"]),
> row.names=c("G1","G2","G3","G4","G5"))
> >
> > Rank1 Rank2 CombR
> > G1 2 1 5
> > G2 5 5...