similar to: Rank Function

Displaying 20 results from an estimated 4000 matches similar to: "Rank Function"

2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2010 Feb 17
2
extract the data that match
Hi r-users,   I would like to extract the data that match.  Attached is my data: I'm interested in matchind the value in column 'intg' with value in column 'rand_no' > cbind(z=z,intg=dd,rand_no = rr)             z  intg rand_no    [1,]  0.00 0.000   0.001    [2,]  0.01 0.000   0.002    [3,]  0.02 0.000   0.002    [4,]  0.03 0.000   0.003    [5,]  0.04 0.000   0.003    [6,] 
2008 Jun 18
4
inverse cumsum
I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33 2.14 0.55 1.40 1989 2.10 0.65 2.74 2.43 1.19 1.45 1990 1.55 0.00 1.59 1.94 0.99 2.14 1991 0.92
2003 Jul 22
1
rank with ties
Hi, Is there a function like rank but that solves the ties by randomly assigning a value (doesn't average ranks of ties). This is what I actually need: I want to make NA all elements of each column in an array that are ranked in a position larger that rankmax for each column. # Say I've got an array b: b<-cbind(c(1:5,5:1),c(1,12,14,2,5,4:8)) #> b # [,1] [,2] #[1,] 1 1
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2023 Dec 17
2
[External] Re: zapsmall(x) for scalar x
I think what's been missed is that zapsmall works relative to the absolute largest value in the vector. Hence if there's only one item in the vector, it is the largest, so its not zapped. The function's raison d'etre isn't to replace absolutely small values, but small values relative to the largest. Hence a vector of similar tiny values doesn't get zapped. Maybe the line
2023 Dec 16
1
zapsmall(x) for scalar x
I was quite suprised to discover that applying `zapsmall` to a scalar value has no apparent effect. For example: > y <- 2.220446e-16 > zapsmall(y,) [1] 2.2204e-16 I was expecting zapsmall(x)` to act like > round(y, digits=getOption('digits')) [1] 0 Looking at the current source code, indicates that `zapsmall` is expecting a vector: zapsmall <- function (x, digits =
2023 Dec 17
1
zapsmall(x) for scalar x
Isn?t that the correct outcome? The user can change the number of digits if they want to see small values? -- Change your thoughts and you change the world. --Dr. Norman Vincent Peale > On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com> wrote: > > ?Zapping a vector of small numbers to zero would cause problems when > printing the results of summary().
2023 Dec 17
1
zapsmall(x) for scalar x
Zapping a vector of small numbers to zero would cause problems when printing the results of summary(). For example, if zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then print(summary(2.220446e-16), digits = 7) would print Min. 1st Qu. Median Mean 3rd Qu. Max. 0 0 0 0 0 0 The same problem can also appear when
2012 Dec 09
3
[LLVMdev] pb05 benchmarks for llvm/dragonegg 3.2
Duncan, With the commit from http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158488.html, the Polyhedron 2005 benchmarks complete again on x86_64-apple-darwin12. The result are similar to what were seen with FSF gcc 4.6.2svn and llvm/dragonegg 3.0 (which was the last release that passed pb05) http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/044091.html. Jack
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
Le 17/12/2023 ? 18:26, Barry Rowlingson a ?crit?: > I think what's been missed is that zapsmall works relative to the absolute > largest value in the vector. Hence if there's only one > item in the vector, it is the largest, so its not zapped. The function's > raison d'etre isn't to replace absolutely small values, > but small values relative to the largest.
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
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
>>>>> Serguei Sokol via R-devel >>>>> on Mon, 18 Dec 2023 10:29:02 +0100 writes: > Le 17/12/2023 ? 18:26, Barry Rowlingson a ?crit?: >> I think what's been missed is that zapsmall works relative to the absolute >> largest value in the vector. Hence if there's only one >> item in the vector, it is the largest, so its
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
Le 18/12/2023 ? 11:24, Martin Maechler a ?crit?: >>>>>> Serguei Sokol via R-devel >>>>>> on Mon, 18 Dec 2023 10:29:02 +0100 writes: > > Le 17/12/2023 ? 18:26, Barry Rowlingson a ?crit?: > >> I think what's been missed is that zapsmall works relative to the absolute > >> largest value in the vector. Hence if
2023 Dec 19
1
[External] Re: zapsmall(x) for scalar x
>>>>> Steve Martin >>>>> on Mon, 18 Dec 2023 07:56:46 -0500 writes: > Does mFUN() really need to be a function of x and the NA values of x? I > can't think of a case where it would be used on anything but the non-NA > values of x. > I think it would be easier to specify a different mFUN() (and document this > new argument)
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
Does mFUN() really need to be a function of x and the NA values of x? I can't think of a case where it would be used on anything but the non-NA values of x. I think it would be easier to specify a different mFUN() (and document this new argument) if the function has one argument and is applied to the non-NA values of x. zapsmall <- function(x, digits = getOption("digits"),
2003 Oct 13
1
zapsmall with all values small (PR#4554)
Hi If all values are small, zapsmall does not zap. For example ... > zapsmall(1e-24) [1] 1e-24 > zapsmall(1e-24, digits=3) [1] 1e-24 Problem appears to be in calculation of digits ... mx <- max(abs(x[!ina])) digits = if (mx > 0) max(0, digits - log10(mx)) else digits If all values are small, mx is very small, log10(mx) is
2012 Dec 10
0
[LLVMdev] pb05 benchmarks for llvm/dragonegg 3.2
Hi Jack, thanks for these numbers. > With the commit from http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158488.html, > the Polyhedron 2005 benchmarks complete again on x86_64-apple-darwin12. The result are similar to what > were seen with FSF gcc 4.6.2svn and llvm/dragonegg 3.0 (which was the last release that passed pb05) >
2002 Dec 22
4
pasting "\" into character strings
Dear R-Help, I'm using R version 1.6.0 on a Windows computer. I am trying to create a function that, among other things, constructs strings that refer to Windows files, e.g., I might want to construct a string like 'c:\work\part1.txt'. I have found that the following does not work. > paste("c:", "\", "work", "\", "part1.txt",