index.rp(x, p=Inf, sorted.dec=FALSE, disable.check=FALSE)
Inf
).TRUE
if the vector has already been sorted non-increasingly; defaults FALSE
.TRUE
to disable some validity checks on the input vector; defaults FALSE
.Note that if $x_1,\dots,x_n$ are integers, then $$r_\infty(x)=H(x),$$ where $H$ is the $h$-index (Hirsch, 2005) and $$r_1(x)=W(x),$$ where $W$ is the $w$-index (Woeginger, 2008).
If disable.check
is set to FALSE
, then
eventual NA
values are removed from the input vector.
If a non-increasingly sorted vector is given as input (set sorted.dec
to TRUE
)
the value of $r_\infty$ is calculated in log time
(note that it may be determined in linear time using max(pmin(x, 1:length(x)))
).
Otherwise, linear time is needed.
index.h
, index.g
, index.lp
, Sstat
, Sstat2
x <- runif(100, 0, 100);
index.rp(x); # the r_oo-index
floor(index.rp(x)); # the h-index
index.rp(floor(x), 1); # the w-index}
Run the code above in your browser using DataLab