Displaying 20 results from an estimated 3223 matches for "decreasing".
2017 Dec 27
2
Numerical stability in chisq.test
The chisq.test on line 57 contains following code:
STATISTIC <- sum(sort((x - E)^2/E, decreasing = TRUE))
However, based on book "Accuracy and stability of numerical algorithms" available from:
http://ftp.demec.ufpr.br/CFD/bibliografia/Higham_2002_Accuracy%20and%20Stability%20of%20Numerical%20Algorithms.pdf
Table 4.1 on page 89, it is better to sort the data in increasing order tha...
2013 Nov 17
1
order() function, decreasing=TRUE unexpected behaviour
There appears to be an issue with the decreasing=TRUE option on the order() function that indicates either a bug or perhaps a design flaw (potentially flawed because I would suggest the majority of users would expect different behaviour).
# demonstration of problem:
x <- c(2,1,3,4,5)
order(x)
order(x, decreasing=TRUE)
order(x) correctly repo...
2002 Sep 03
0
FIX for old and new problems with order(): order fails with na.last=NA (PR#1981)
I recently reported order() to ignore decreasing=TRUE with na.last=NA.
Now I discovered two other problems and send corrected code.
Best regards
Jens Oehlschlägel
# PROBLEM 1 see PR#1906
# PROBLEM 2
> order(1, na.last=NA)
Error in apply(sapply(z, is.na), 1, any) :
dim(X) must have a positive length
# clearly wrong as
> order...
2018 Dec 04
0
order(decreasing=c(TRUE,FALSE),...)
The NEWS file for R-devel (as of 2018-11-28 r75702) says
? order(...., decreasing=c(TRUE,FALSE)) could fail in some cases.
Reported from StackOverflow via Karl Nordstr?m.
However, either I don't understand the meaning of decreasing=c(TRUE,FALSE)
or there are still problems. I thought order(x,y,decreasing=c(TRUE,FALSE)
meant to return indices, i, such that x[i] was non-...
2008 Nov 25
2
dots methods: dispatch issues
...for currently available ones.
> removeGeneric("rbind")
[1] TRUE
> rbind
function (..., deparse.level = 1)
.Internal(rbind(deparse.level, ...))
<environment: namespace:base>
> setGeneric("order", signature="...",
+ function (..., na.last=TRUE, decreasing=FALSE)
+ standardGeneric("order"))
Creating a generic for "order" in package ".GlobalEnv"
(the supplied definition differs from and overrides the implicit generic
in package "base": Signatures differ: (...), (na.last, decreasing))
[1] "o...
2005 Feb 10
3
question about sorting POSIXt vector
...perhaps an
OS issue? (I run R 2.0.1 on Win xp.)
Thank you,
b.
#------------code
test <- c("2005-02-08 18:49:15","2005-02-07 18:36:54",
"2005-02-04 18:37:03","2005-02-06 18:29:04")
test <- strptime(test,format="%Y-%m-%d %H:%M:%S")
order(test,decreasing=F) #doesn't work - why?
tst <- test + 0
order(tst,decreasing=F) #works - how come?
print(tst)
#------------run
> test <- c("2005-02-08 18:49:15","2005-02-07 18:36:54",
+ "2005-02-04 18:37:03","2005-02-06 18:29:04")
> test <- strptime(test,f...
2006 Jul 02
4
Test for argument in ...
Hello!
Say I have a function foo1, which has argument ... to pass various
arguments to foo2 i.e.
foo1 <- function(x, ...)
{
foo2(x, ...)
}
Say that foo2 accepts argument arg1 and I would like to do the following:
- if foo1 is called as foo1(x) then I would like to assign some value to
arg1 inside foo1 before calling foo2
arg1 <- "some value"
foo2(x, arg1=arg1)
- if foo1 is
2011 May 02
2
vector decreasing by a factor
...te new to R so this question will sound quite fundamental. I need to create a vector of length 160. The first element should be (1+r)^159 and each element thereafter should decrease by a factor of (1+r) until the 160th element that should be 1. Is there a function similar to seq() but increasing or decreasing by factors? I need to do this in one step i.e, not using loops. Any help would be greatly appreciated.
Regards,
Andre
[[alternative HTML version deleted]]
2008 Sep 18
1
print job counter never decreases
Hello
I've a samba printing problem: while all cups handled printers work
perfectly, a fax printer application recently stopped working because of
the default 'max print jobs' of 1000. In reality, the spool directory is
empty.
My question is: where ist this 'max print jobs' stored and how should it
decrease or be decreased automatically or manually?
Is there a way for the
2004 Apr 13
2
Non-homogeneity of variance - decreasing variance
Hello all,
I'm running very simple regression but face a problem of non-homogeneity of
variance, but with a decreasing variance with increasing mean...I do not
know how to deal with that.
this relationship doesn't seem to be strong, but it's my first time to see
something like that, and would like to know what to do if one day it becomes
stronger. I tested just for fun some transformation but was not able t...
2012 May 31
1
density plots using density.lf, data.frame and sort.int errors
...d the data as a table using read.table, with header=TRUE (I
excluded 2000 values), when calling the objects it appears to be there and
I can see the values
this is what I get when doing
density.lf (x=logN0, n=50, window="gaussian")
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
decreasing)) :
undefined columns selected
then assigned a column name (using colname so it is called first), then
assigned it as a vector using
assign ("x", c (logN0))
the error I get is
density.lf (x, n=50, window="gaussian")
Error in sort.int(x, na.last = na.last,...
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 that point rank() had not
yet
acquired th...
2010 Oct 06
2
ggplot2 barplot in decreasing frequency
Hi all,
I have a large data frame and would like to make a barplot of a categorical
variable with the bars sorted in order of decreasing frequency.
# Example:
v1 = c(1.2, 1.4, 0.9, 1.0, 1.1, 1.0)
v2 = c("aa", "cc", "bb", "bb", "cc", "bb")
v3 = c(8, 10, 11, 9, 9, 10)
df = data.frame(v1=v1, v2=v2, v3=v3)
# How can I tell ggplot to sort the bars?
# First bar = "bb"...
2015 Oct 21
2
rank(, ties.method="last")
...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
>
------------------------------
In the particular example (of length 4), what is really wanted is the following.
ind <- integer(4)
ind[sort.list(x, decreasing=TRUE)] <- 4:1
ind
The...
2008 Jan 31
1
decrease amount of ticks on y axis in lattice levelplot
Hi all,
How can I decrease the number of ticks on the y-axis in a lattice
levelplot()? I have as many ticks displayed on the y-axis as I have
columns of data (1000 columns), how can I decrease this amount of ticks,
while still properly displaying all the data?
Note that I get my data from a matrix object, in which the z-values of
the levelplot are the actual values in the matrix, whereas the
2007 Nov 20
5
yuv - rgb conversion without contrast decrease.
Hello list,
When I convert an yuv pixel into rgb using the recipies in
http://www.fourcc.org/fccyvrgb.php I get an accurate color conversion
but the contrast seems to be decreased. If i write, e.g., the pixel
directly into an sdl yuv_overlay, I get a well-contrasted frame,
however, if I convert the pixel to rgb and call SDL_MapRGB, I get a
contrast-decreased frame.
Thanks,
Ribamar
2008 Aug 21
1
order(x,y, decreasing = c(FALSE, TRUE)) - how / elegantly?
I've found the need to compute a version of order(x,y)
where I want the sort order
for *increasing* x and *decresing* y ...
something we could imagine could be provided in the future as
order(x,y, decreasing = c(FALSE, TRUE))
i.e., using a 'vectorized' decreasing argument.
{No, I'm not volunteering right now!}
I've found the following R-level solution and
like to quiz you for more elegant / faster solutions
{but I am not really interested in replacing
order(x) by sort.list(x, me...
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) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not...
2006 Jul 28
1
order() 'decreasing =' argument must be typed in full
## While in R v. 2.3.1 (the mid-July patch for Windows)
## on a Windows XP machine, this call to order() works fine...
order(1:10,decreasing = TRUE)
## [1] 10 9 8 7 6 5 4 3 2 1
## ...however, the argument name 'decreasing'
## must be typed in toto (note the missing 'g'
## in the following):
> order(1:10,decreasin = TRUE)
## Error in order(na.last, decreasing, ...) :
## argument lengths differ
## I...
2010 Mar 23
2
Decreasing Cumsum Function?
Hi all,
I have a frequency data that looks like this.
3
2
1
5
What I want to get is the "decreasing" cumulative of this data
yielding
11
8
6
5
0
Is there any?
I am aware of cumsum(), which will yield
3
5
6
11.
But it is not what I want.
- G.V.