similar to: Suggestions to speed up median() and has.na()

Displaying 20 results from an estimated 6000 matches similar to: "Suggestions to speed up median() and has.na()"

2006 Mar 11
1
Quicker quantiles?
Motivated by Deepayan's recent inquiries about the efficiency of the R 'quantile' function: http://tolstoy.newcastle.edu.au/R/devel/05/11/3305.html http://tolstoy.newcastle.edu.au/R/devel/06/03/4358.html I decided to try to revive an old project to implement a version of the Floyd and Rivest (1975) algorithm for finding quantiles with O(n) comparisons. I used
2003 Oct 29
3
long algo
Hi everyone, I ve been using R for months and find it really practical and straight forward. However (the inevitable however), I am finding it very slow for one of my operations: it s basically an itertation over i and j in a pretty big table (4* 4608). It takes 30 minutes!!!! Thanks Ps:if it can help here is the source: median1<-matrix(nrow=4608,ncol=1)
2006 Mar 14
1
Fwd: makeconf issue on R-devel 2006-03-12 r37524
I sent the message below to r-sig-mac yesterday, but having no reply I decided to explore a bit myself and found that editing: /Library/Frameworks/R.framework/Versions/2.3/Resources/share/make/ shlib.mk yzzy: diff shlib.mk shlib.mk~ 3c3 < include $(R_HOME)/etc/Makeconf --- > include $(R_HOME)/etc${R_ARCH}/Makeconf restored the functionality of R CMD INSTALL. Is this a known issue?
2009 Jul 13
1
Fortran function for quantiles
Hi, I was wondering whether there is any Fortran function or associated library for evaluating the quantiles of a set of values (something which the R-function quantile() does). Any help will be much appreciated. Thanks and regards, Dhiman Bhadra [[alternative HTML version deleted]]
2009 Apr 14
2
any other fast method for median calculation
Hi there, I got a data frame with more than 200k columns. How could I get median of each column fast? mapply is the fastest function I know for that, it's not yet satisfied though. It seems function "median" in R calculates median by "sort" and "mean". I am wondering if there is another function with better algorithm. Any hint? Thanks, Xin Zheng
2006 Mar 02
2
Bug/Wishlist: 'partial' in 'sort' and 'quantile' (PR#8650)
Hi, This is essentially a reposting of http://tolstoy.newcastle.edu.au/R/devel/05/11/3305.html which had no responses, and the behaviour reported there persists in r-devel as of yesterday. (1) sort() with non-null partial > x = rnorm(100000) > keep = as.integer(ppoints(10000) * 100000) > system.time(sort(x)) [1] 0.05 0.00 0.04 0.00 0.00 > system.time(sort(x, partial = keep)) [1]
2012 Dec 03
1
qr.qy and qr.qty give an error message when y is integer and LAPACK=TRUE
With this example set.seed(123) A <- matrix(runif(40), nrow = 8) y <- 1:nrow(A) A.laqr <- qr(A, LAPACK=TRUE) both qr.qy(A.laqr,y) and qr.qty(A.laqr,y) give the respective error messages Error in qr.qy(A.laqr, y) : 'b' must be a numeric matrix Error in qr.qty(A.laqr, y) : 'b' must be a numeric matrix However when Lapack is not used as in A.liqr <- qr(A,
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal. On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) install.packages("systemfit")
2018 May 15
1
Systemfit
Unless there is good reason not to, always cc the list -- there are lots of smarter folks than I on it who can help. I may or may not have time to look at this. Hopefully someone else will. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end. I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis. I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2011 Jul 15
6
how to order each element according to alphabet
Hi there, I have a large amino acid csv file like this: input.txt: P,LV,Q,Z P,VL,Q,Z P,ML,QL,Z There is a problem with this file, since LV and VL are in fact the same thing. How do I order each element according to alphabetical order so that the desired output would look like: output.txt: P,LV,Q,Z P,LV,Q,Z P,LM,LQ,Z -- View this message in context:
2009 Mar 05
1
quantile(), IQR() and median() for factors
Dear all, from the help page of quantile: "x ??? numeric vectors whose sample quantiles are wanted. Missing values are ignored." from the help page of IQR: "x ??? a numeric vector." as a matter of facts it seems that both quantile() and IQR() do not check for the presence of a numeric input. See the following: set.seed(11) x <- rbinom(n=11,size=2,prob=.5) x <-
2006 Sep 01
1
Reading many files at once
dear group, i have 100 files starting with 'hsa-*'. ex. file: fruit p-value ------------ apple 0.0003 orange 0.004 kiwi 0.0003 peach 0.0004 I want to read all these files and create a single matrix. here each file may have different fruit names. in the matrix i want to have a union of all fruits and those should be the rows in the matrix and file names should be columns.
2009 Aug 21
4
help with median for each row
Hi, I tried looking through google search on whether there's a way to computer the median for each row of a nxn matrix and return the medians for each row for further computation. And also if the number of columns in the matrix are even, how could I specify which median to use? Thank you very much! -- Edward Chen [[alternative HTML version deleted]]
2006 Feb 05
3
reading in a tricky computer program output
Hi R user I need to read in some values from a computer program output. I can't change the output format because the developer of the program doesn't allow to change the format of output. There are two formats. First one looks like this if I have 10 variables, ------------------------------------------------------------------------------------------------------ [ 1]
2002 Feb 06
4
Weighted median
Is there a weighted median function out there similar to weighted.mean() but for medians? If not, I'll try implement or port it myself. The need for a weighted median came from the following optimization problem: x* = arg_x min (a|x| + sum_{k=1}^n |x - b_k|) where a : is a *positive* real scalar x : is a real scalar n : is an integer b_k: are negative and positive scalars
2006 Nov 18
1
(no subject)
Hello, I need help to understand my error in this code... I would like to make a direct sampler... thanks Celine p<-matrix(c(1,2,3,2,1,4),3,2,byrow=T) p<-p/sum(p) ky<-ncol(p) kx<-nrow(p) p.vec<-as.vector(t(p)) l<-rmultinom(1,1,p) l<-(t(l)) m<-(l%%ky) ifelse (m==0, i<-l/ky && (j<-ky), i<-((l/ky)+1) && (j<-(l %% ky)
2008 Apr 27
1
parallel max, min, and median of dataframe columns
Hello, all, I have a dataframe of three rows and umpteen columns. I want to show the maximum, minimum, and median with a vertical line and a central dot (I'd use a boxplot, but with only three data points, that's overkill; I can't just use points, because of overlap and some of the other data plotted on the graph). This works: > boxplot(data_frame,