Displaying 20 results from an estimated 10000 matches similar to: "reason for na.last=TRUE in rank"
2004 May 23
2
subset of documentation for a given recommended package
Dear R-help readers,
In R 1.8.1 it was easy to print the documentation for recommended packages: go
to the full reference manual (refman.pdf) and print the relevant pages, which
were contiguous. With R 1.9.0 some of those packages (e.g. "ts") have become
part of the "stats" package, and hence their documentation is scattered
throughout that of the other component packages of
2003 Dec 04
1
assigning colors to barplot when beside=TRUE
dear list,
i am having trouble coloring the bars in a barplot. my data have two
groups, which i would like to plot side by side. within each group i
want to sort the observations in decreasing order, like a pareto
chart. the bar colors would relfect the value of a third variable.
below i have generated a reproducible example. the bar heights are a
given pig's "gain",
2005 Sep 03
2
Inconsistence in specifying action for missing data
A question for R (and perhaps S and SPlus) historians.
Does anyone know the reason for the inconsistency in the way that the
action that should be taken when data are missing is specified? There
are several variants, na.action, na.omit, "T", TRUE, etc. I know that a
foolish consistency is the hobgoblin of a small mind, but consistency
can make things easier.
My question is not meant
2005 Aug 23
2
merge list entries
dear expeRts,
i would like to merge the data frame entries in a list. for example:
> #input
> myl <- list(q1=data.frame(id=c("Alice", "Bob"), grade=c(90, 49)),
q2=data.frame(id=c("Alice", "Chuck"), grade=c(70, 93)),
q3=data.frame(id=c("Bob", "Chuck"), grade=c(84, 40)))
> #output
> (mydf <-
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
2006 Apr 11
9
rails equivalent to asp''s Application object?
In asp you have an Application built-in object, which works just like
the Session hash, but it lets you share information among all users of a
given application.
which is the rails equivalent???
and if there isn''t, how would you implement such a thing ? (there would
be concurrency issues to take into account, in fact asp''s application
object has some lock and unlock methods
2005 Dec 09
1
lattice legend colors recycling sooner than expected
dear r-helpers,
it seems the colors in an automatically generated lattice legend
recycle after the 8th color, even when the user has set e.g.
superpose.symbol$col to be longer than 8. the following example will
illustrate what i mean:
z <- data.frame(x=rep(letters[1:15], each=4), y=rnorm(60),
groups=rep(LETTERS[1:3], 20))
library(nlme)
library(lattice)
plot(groupedData(y ~ x |
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
>
> >
2016 Aug 25
1
sort.int(c(2, NA, 4), index.return=TRUE, na.last=NA, method)$ix differ for method="radix" and "shell"/"quick" (+ new default in R-devel)
Does sort.int(c(2,NA,4), index.return=TRUE, na.last=NA,
method="radix")$ix give the intended result, because I get:
> sort.int(c(2,NA,4), index.return=TRUE, na.last=NA, method="radix")
$x
[1] 2 4
$ix
[1] 1 3
With method="shell" and method="quick" in R devel, I get:
> sort.int(c(2,NA,4), index.return=TRUE, na.last=NA, method="shell")
$x
2017 Dec 22
2
ot: how to block persistent same invalid account, different IPs
I've installed fail2ban, it seems to be working as it identified my failed
test logins, BUT, my question is:
what can I do when I see same invalid name trying to login to dovecot,
different IP each time, how can I say block each IP as used by this name ?
or it that a bad idea ?
I can see two persistent attempts as so:
I don't have such user 'ignacio' or 'julian'
# grep
2008 Jan 31
3
Log rank test power calculations
Does anyone have any ideas how I could do a power calculation for a log
rank test. I would like to know what the suggested sample sizes would
be to pick a difference when the control to active are in a ratio of 80%
to 20%.
Thanks
Dan
--
**************************************************************
Daniel Brewer, Ph.D.
Institute of Cancer Research
Email: daniel.brewer at icr.ac.uk
2008 Oct 31
4
how to compute a roc curve
Hi,
I'm trying to set up a prediction software, now i testing the performance
of my method, so i need to calculate a ROC curve, specially auc, cut-off,
sens and spec, i just looking at ROCH package, but it's a mass for me, i'm
not a math guy and I'm getting lost
Could any of you recommend me an easy-to-use package to do this task? i just
have a list of positive/negative samples
2010 Jul 02
2
is there a way to do dense rank in R
I have not been able to find a way to do dense rank in R
Here is an example of what I need
rank() gives the following
5 rank 1
7 rank 2
7 rank 2
9 *rank 4*
but I want
5 rank 1
7 rank 2
7 rank 2
9 *rank 3*
*
*
thanks
SS
[[alternative HTML version deleted]]
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?
2007 Aug 15
2
X11 problems
Hi
I'm working in a ubuntu feisty OS, when I try to start X11() i get the
following message
> X11()
Error in X11() : could not find any X11 fonts
Check that the Font Path is correct.
In addition: Warning messages:
1: locale not supported by Xlib: some X ops will operate in C locale
2: X cannot set locale modifiers
>
Can some body tell me what to do?
--
Pau Marc Muñoz Torres
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 ?
2006 Oct 10
3
Rank Function
Does anyone know why the two rank functions gives
different results? I need to use the rank function in
a "for" loop, so the sequence to be ranked is given
values in the form of part (1). How can I use
assignment like in part (1) to get correct ranks as in
part (2)?
Thank You
Part (1)
i<-1.94
b<-0.95-i
c<-1.73-i
d<-2.62-i
y<-c(0.68,0.95,b,c,d)
y
0.68 0.95 -0.99
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
2005 Nov 01
1
percent rank by an index key?
What is the easiest way to calculate a percent rank “by” an index key?
Foe example, I have a dataset with 3 fields:
Year, State, Income ,
I wish to calculate the rank, by year, by state.
I also wish to calculate the “percent rank”, where I define percent rank as rank/n.
(n is the number of numeric data points within each date-state grouping.)
This is what I am