similar to: any other fast method for median calculation

Displaying 20 results from an estimated 10000 matches similar to: "any other fast method for median calculation"

2009 May 29
4
R's documentation
Sometimes I get confused with R's documentation. It seems the documents is not maintained and updated well. Anyone has similar feeling? I don't mean to offend anyone. I hope R would get better and better. But documentation is really one very important factor which could attract people coming or drive people away. Xin Zheng [[alternative HTML version deleted]]
2009 May 28
3
how to avoid add 'X' before numeric colnames when read.table
Hi all, Is there any way to keep numeric colnames as is? Any hint will be appreicated. Xin Zheng [[alternative HTML version deleted]]
2009 May 29
1
'mean' is not reverted in median() as NEWS says (PR#13731)
Full_Name: Version: 2.9.0 OS: windows, linux Submission from: (NULL) (128.231.21.125) In NEWS, it says "median.default() was altered in 2.8.1 to use sum() rather than mean(), although it was still documented to use mean(). This caused problems for POSIXt objects, for which mean() but not sum() makes sense, so the change has been reverted." But it's not reverted yet.
2006 Apr 10
2
Suggestions to speed up median() and has.na()
Hi, I've got two suggestions how to speed up median() about 50%. For all iterative methods calling median() in the loops this has a major impact. The second suggestion will apply to other methods too. This is what the functions look like today: > median function (x, na.rm = FALSE) { if (is.factor(x) || mode(x) != "numeric") stop("need numeric data")
2011 Apr 07
1
anyway to get R unevaluated expr independent on arguments
Hi there, Suppose the cmd is "a<-3", I can parse the cmd sexp with R_ParseVector and eval it. My question is - is it possible to parse a cmd like "a <- ?", afterwards evaluation will give corresponding result depend on different argument? In other words, '?' is just a placeholder. Thanks. Xin [[alternative HTML version deleted]]
2005 Mar 18
4
passing arguments to FUN in lapply
Suppose I have a nx2 matrix of data, X, the following code generate density estimation for each column and plot them denlist <- apply(X, 2, density) par(mfrow=c(1,2)) lapply(denlist, plot) Does anyone know how to change the main title of each density plot to "var 1", "var 2" by passing optional argument "main"? I've tried lapply(denlist, plot,
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
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?
2012 Feb 08
4
String position character replacement
Hi, Is there a way to efficiently replace specified indices in a string with another character? For example, if I had a vector of strings such as [1] "hellohowareyoudoing" [2] "imgoodhowareyou" [3] "goodandyou" [4] "yesimgoodijusttoldyou" [5] "ohyesthatsright" and had a list of positions that I want to replace with the character "-"
2008 Nov 07
1
RJS show as 'try...' in AJAX update
Hi guys, I am trying to display Javascript code after an Ajax call. It is executing the JS code, but it''s also displaying it. It shows as: try { alert(...); } catch .. ... my controller code: render :update do |page| page.alert message_var end my Javascript code: new Ajax.Updater("div_id", my_controller_url, { asynchronous: true, evalScripts: true,
2010 Feb 13
3
how to do calculations in data matrices?
Please give me just a reference where I can find something useful. In summary, I need to : - find the median of each row of a matrix - create a new matrix with each value in the first matrix divided by the median of its row - if a value "a" in the second matrix is < 1, I need to substitute it with 1/a I know that for some of you it must be overeasy, but I swear I googled for two
2010 Dec 07
9
[PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
This problem is found in meego testing: http://bugs.meego.com/show_bug.cgi?id=6672 A file in btrfs is mmaped and the mmaped buffer is passed to pwrite to write to the same page of the same file. In btrfs_file_aio_write(), the pages is locked by prepare_pages(). So when btrfs_copy_from_user() is called, page fault happens and the same page needs to be locked again in filemap_fault(). The fix is to
2006 Oct 11
1
RE: W2K3 Server Installation fails with ACPI=1 on
Steven, I found where the difference is, it may be my fault: My changeset number + 1 = your changeset number. My 11160 is your 11159, and my 11161 is your 11160. Attached please see those patches, Thanks, Winston, -----Original Message----- From: Steven Smith [mailto:sos22@hermes.cam.ac.uk] On Behalf Of Steven Smith Sent: Wednesday, October 11, 2006 10:33 AM To: Wang, Winston L Cc: Stefan Berger;
2007 May 24
3
Exception Notification Plugin Question
Hi, I have two questions re the Exception Notifier plugin (i.e. which you install via "ruby script/plugin install exception_notification") Q1 - In it''s current setup (where it uses /public/500.html) is it possible to remove the "Status: 500 Internal Server Error Content-Type: text/html" text which seems to mysteriously get place at the top of the page? Q2 -
2012 Mar 14
3
Needing a better solution to a lookup problem.
I have a solution (actually a few) to this problem, but none are computationally efficient enough to be useful. I'm hoping someone can enlighten me to a better solution. I have data frame of chromosome/position pairs (along with other data for the location). For each pair I need to determine if it is with in a given data frame of ranges. I need to keep only the pairs that are within any of
2020 Oct 05
1
R-help Digest, Vol 212, Issue 4
Hi -- there are lots of replies --I have not read them all, if someone else suggested this, sorry for duplication. This is similar to the suggestion using mapply, but not specific to matrices. In fact it's a kludge that applies to many settings. You 'sapply' over the index 1:2, and pass a, b as arguments: a <- c(1,4) b <- c(5,8) sapply(1:2, FUN=function(x, a, b)a[x]:b[x],
2011 Aug 04
1
Multiple endpoint (possibly group sequential) sample size calculation
Hello everyone, I need to do a sample size calculation. The study two arms and two endpoints. The two arms are two different cancer drugs and the two endpoints reflect efficacy (based on progression free survival) and toxicity. Until now, I have been trying to understand this in terms of a one-arm design, where the acceptable rate of efficacy might be 0.40, the unacceptable rate of efficacy
2009 Mar 11
1
matrix multiplication, tensor product, block-diagonal and fast computation
Dear R-users, I am searching to the "best" way to compute a series of n matrix multiplications between each matrix (mXm) in an array (mXmXn), and each column of a matrix (mXn). Please find below an example with four possible solutions. The first is a simple for-loop which one might avoid; the second solution employs the tensor product but then manually selects the right outcomes. The
2008 Oct 29
1
How to set read.table variables to vectors?
The summary stats for the xin and yin variables below are correct. However, if I use plot(xin,yin), an exception is thrown saying that "object xin is not found." Also, it is apparent that I can't successfully replace the x and y vectors with values from xin and yin. The four plots on one panel are showing but the range of x and y is only [0,1], and therefore, it seems like an
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi, I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this: library(survival) data(lung) lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung) # lung.byPS Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung) 1