similar to: R function for percentrank

Displaying 20 results from an estimated 9000 matches similar to: "R function for percentrank"

2008 Apr 10
1
function to calculate networkdays?
Hi, Does anyone know if R has a built-in function that is similar to Excel's NETWORKDAYS function? i.e., Returns the number of whole working days between two dates. Working days exclude weekends. Thanks, -- Tom [[alternative HTML version deleted]]
2011 Mar 10
1
getting percentiles by factor
Hello, I'm trying to get percentiles (PERCENTRANK for excel users) by factor in the following data.frame: myExample <- data.frame(Ret=seq(-2, 2.5, by=0.5),PE=seq(10,19),Sectors=rep(c("Financial","Industrial"),5)) myExample <- na.omit(myExample) Thanks to Patrick I I managed to put together the following lines which does it for the "Ret" column: myecdf
2010 Jun 04
1
subsetting a dataframe
Hi there, > a<-data.frame(c(1,2,2,5,9,9),c("A","B","C","D","E","F")) > names(a)<-c("x1","x2") > max(table(a$x1)) [1] 2 > The above shows the max count for x1 is 2, which is correct. But we can't tell there are 2 groups that meet this criteria: 2,2 and 9,9. I then want to extract the
2009 Mar 30
1
what is R equivalent of Fortran DOUBLE PRECISION ?
I noticed taht R cannot understand certain Fortran real constant formats. For instance: c14 <- as.double( 7.785205408500864D-02) Error: unexpected symbol in " c14 <- as.double( 7.785205408500864D" The above "D" is used in Fortran language to indicate the memory starage mode. That is for instructing Fortran compiler to store such a REAL constant in DOUBLE
2019 Sep 19
1
Re: Thoughts on nbdkit automatic reconnection
I have an update on the networking issue: - After the deep dive into the logs of the firewall by customer's security team, it turns out that even though there were some disconnections, the time-stamps do not match. This means that we got the disconnected by something else (ESXi or conversion host perhaps) - As we mentioned in the chat briefly, there could be general keep-alive issues on both
2013 Oct 16
7
Is there something wrong with R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"?
Hi, pnorm(-1.53,0,1) under version 3.0.2 gives 0.05155075. I am pretty sure it should be 0.063. Is there something wrong with this version of R? I am using: R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) -- Tom [[alternative HTML version deleted]]
2008 May 09
1
Which gls models to use?
Hi, I need to correct for ar(1) behavior of my residuals of my model. I noticed that there are multiple gls models in R. I am wondering if anyone has experience in choosing between gls models. For example, how should one decide whether to use lm.gls in MASS, or gls in nlme for correcting ar(1)? Does anyone have a preference? Any advice is appreciated! Thanks, -- Tom [[alternative HTML
2008 Apr 29
2
function to generate weights for lm?
Hi, I would like to use a weighted lm model to reduce heteroscendasticity. I am wondering if the only way to generate the weights in R is through the laborious process of trial and error by hand. Does anyone know if R has a function that would automatically generate the weights need for lm? Thanks, -- Tom [[alternative HTML version deleted]]
2007 Dec 31
3
stack charts right on top of each other
Hi, I tried to stack two charts on top of each other using the following R functions: par(mfrow=c(2,1)) plot(rnorm(1:3),xaxt="n",xlab="") plot(rnorm(1:3)) This created two charts, one on top of the other, but there is too much space between them. Does anyone know how to elimiate the space in between the charts? Thanks, -- Tom [[alternative HTML version deleted]]
2000 Nov 20
2
precision, incorrect(?) tapply() NA's
Hi, Summary: I ran into some unexpected behavior in approx() and tapply() that introduced NA's in "clean" data due to (?) numerical accuracy/round off. The culprit seems to be in match() that coerces it's arguments to character, loosing precision in the process. [R development version 1.2.0, 08 Nov 2000, on Linux] Example: > r > [1] 0.6931472 0.6931472 0.6931472
2000 Nov 20
2
precision, incorrect(?) tapply() NA's
Hi, Summary: I ran into some unexpected behavior in approx() and tapply() that introduced NA's in "clean" data due to (?) numerical accuracy/round off. The culprit seems to be in match() that coerces it's arguments to character, loosing precision in the process. [R development version 1.2.0, 08 Nov 2000, on Linux] Example: > r > [1] 0.6931472 0.6931472 0.6931472
2006 Oct 21
2
how do I find the row index number, or row name, of a given value in a vector?
Hi, I noticed that max(x) returns the maximum value of a vector, but the function doesn't give the user the option of retrieving the row index number instead. If I used max(x) to find the maximum value of vector x, then is there a function I can use to find the index number, or row name, of the maximum value? Thanks, Tom [[alternative HTML version deleted]]
2008 Mar 09
2
format numbers into percentages
Hi, I am currently using the following to formate numbers into percentages: x=0.00112 paste(round(x*100,2),"%",sep="") I am wondering if there is a built in R function that does the same. Does anyone know? Thanks, -- Tom [[alternative HTML version deleted]]
2008 Jan 04
2
question about scale() function
Hi, The documentation for scale() states:"If center is TRUE then centering is done by subtracting the column means (omitting NAs) of x from their corresponding columns". But it seems that R is subtracting something else instead of the column mean: > x=c(2,4,3,4,5) > mean(x) [1] 3.6 > x-mean(x) [1] -1.6 0.4 -0.6 0.4 1.4 > scale(x) [,1] [1,] -1.4032928 [2,]
2010 Sep 03
1
Weird erratic error and illogical error message, could someone explain this?
Hello, It's several days I try to track this bug, and even cannot cook a reproducible example. Yet, it occurs consistently in a long-running task after a variable period of time. Here is an example: ... my long-running code [as I said, cannot give something simple that produces this bug in a reproducible manner] Error in match(x, table, nomatch = 0L) : formal argument
2006 Nov 01
4
Problem with data type recognition and conversion
Hi, I have a CSV file with two columns; the first column is date, second column is numbers. I used read.csv() to load the file into the variable temp. Somehow, R could not recognize my numbers as double. Instead, it thinks these numbers are integer even though they all have decimal points (isn't that strange?). The problem I ran into is that if I tried to convert the numbers to double using
2015 Mar 10
3
[LLVMdev] Chatty C++API code generation
Hi all, when I have c code like --- c code ------------- struct stest { /* deklariert den Strukturtyp person */ int age; float weight; } foo={44,67.2}; /* deklariert Variable des Typs person */ int main() { callAFunction(foo.weight); ------------------------ The generated c++API code to me seems to be too chatty in the sense that the foo.weight's data
2006 Oct 19
2
use date as x-axis
Hi, I have the following data in two columns. The first column is the date, the second is data. Date Data 3-Jan-95 459.21 4-Jan-95 459.13 5-Jan-95 460.73 6-Jan-95 460.38 9-Jan-95 460.67 10-Jan-95 460.9 11-Jan-95 461.68 12-Jan-95 461.64 13-Jan-95 461.64 16-Jan-95 465.97 17-Jan-95 469.38 18-Jan-95 470.05 19-Jan-95 469.72 20-Jan-95 466.95 23-Jan-95 464.78 24-Jan-95 465.81 25-Jan-95 465.86 I would
2019 Aug 15
2
Feature request: non-dropping regmatches/strextract
I do think keeping the default behavior is desirable for backwards compatibility; my suggestion is not to change default behavior but to add an optional argument that allows a different behavior. Although this can be implemented in a user-defined function, retaining empty matches facilitates programmatic use, and seems to be something that should be available in base R. It is available, for
2008 Mar 06
1
Argument "nomatch" matched by multiple actual arguments ... %in% -> match?!?
When I run R CMD check R.oo on R v2.7.0 devel (2008-03-04 r44677) on WinXP I get the following error while testing examples: Error in match(x, table, nomatch = 0) : formal argument "nomatch" matched by multiple actual arguments Calls: setMethodS3 -> setMethodS3.default -> %in% -> match Execution halted How is that even possible with: > get("%in%") function (x,