similar to: Sum objects in a column between an interval defined by conditions on another column

Displaying 20 results from an estimated 2000 matches similar to: "Sum objects in a column between an interval defined by conditions on another column"

2011 Jun 27
1
create a new data frame after comparing two columns of the previous data frame
Hi everyone, I am trying to find a way to filter a table; If I am given for example the following table: > head(intra) chr miRNA start end strand ACC hsa_ID region region_start region_end gene_id transcrip_id 1 chr1 miRNA 1102484 1102578 + ACC="MI0000342"; ID="hsa-mir-200b"; exon 1102484 1102578 NR_029639 NR_029639 2 chr1
2011 Jun 07
1
extract data from a data frame field
Hi all, I am given the a data frame in which one of the columns has more information together- see column 4, peak_loc: chr start end peak_loc cluster_TC strand peak_TC 1 chr1 564620 564649 chr1:564644..564645,+ 94 + 10 2 chr1 565369 565404 chr1:565371..565372,+ 217 + 8 3 chr1 565463 565541 chr1:565480..565481,+ 1214 + 15 4 chr1
2011 Jun 08
1
return counts of elements on a table column depending on elements on another column
Hi, I am given the following table: > head(hsa_refseq) chr genome region start stop nu strand nu.1 nu.2 gene_id 1 chr1 hg19_refGene CDS 67000042 67000051 0 + 0 gene_id NM_032291 2 chr1 hg19_refGene exon 66999825 67000051 0 + . gene_id NM_032291 3 chr1 hg19_refGene CDS 67091530 67091593 0 + 2 gene_id NM_032291 4 chr1 hg19_refGene exon
2011 Jun 19
3
extract data from a column
Hi all, I have a column that has the following format: chr1:564588..564589,+ and I want to extract only the coordinates; I have tried writing a regular expression but I couldn't figure out how I should write it. Does anyone know? Thank you, Best, Nanami [[alternative HTML version deleted]]
2013 Mar 11
0
splitting column into two
HI, Try this: dat1<- read.table(text=" ?V1,V2,V3,V4,V5,V6,V7 ?chr1,564563,564598,564588 564589,1336,+,134 ?chr1,564620,564649,564644 564645,94,+,10 ?chr1,565369,565404,565371 565372,217,+,8 ?chr1,565463,565541,565480 565481,1214,+,15 ?chr1,565653,565697,565662 565663,1031,+,28 ?chr1,565861,565922,565883 565884,316,+,12 ",sep=",",header=TRUE,stringsAsFactors=FALSE)
2011 Jun 23
2
Confidence interval from resampling
Dear R gurus, I have the following code, but I still not know how to estimate and extract confidence intervals (95%CI) from resampling. Thanks! ~Adriana #data penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104,85,83,80,74,70,66,54,46,45,43,40,38,10) x<-log(penta+1) plot(ecdf(x),
2009 Jul 16
2
evaluate sum of sum
Hi R-users, Could anybody show me how to write a code to evaluate sum(z[i] + sum(k[j]*(z[i])^(k[j])), i=1 to 4, j=0 to infinity) ? Thank you so much for any help given. [[alternative HTML version deleted]]
2018 Mar 16
0
Discrepancy: R sum() VS C or Fortran sum
Install the gmp package, run your code, and then try this: bu <- gmp::as.bigq(u) bs4 <- bu[1] + bu[2] + bu[3] + bu[4] + bu[5] s4 <- as.double(bs4) s1 - s4 ## [1] 0 s2[[2]] - s4 ## [1] 7.105427e-15 s3 - s4 ## [1] 7.105427e-15 identical(s1, s4) ## [1] TRUE `bs4` is the exact sum of the binary rationals in your `u` vector; `s4` is the closest double precision to this exact sum.
2018 Mar 16
1
Discrepancy: R sum() VS C or Fortran sum
My simple functions were to compare the result with the gfortran compiler sum() function. I thought that the Fortran sum could not be less precise than R. I was wrong. I am impressed. The R sum does in fact match the result if we use the Kahan algorithm. P. I am glad to see that R sum() is more accurate than the gfortran compiler sum. On 16/03/18 11:37 AM, luke-tierney at uiowa.edu wrote:
2006 Aug 09
0
Sum/Aggregate at database level or in rails controller?
Hi, Database model of my web app is as follows, users(id,name) Taskcategories(id,user_id,name) Tasks(id,taskcategory_id,name) TasksData(id,tasks_id,durationInHrs,date) I want to collect and show following data from the above tables, in the view, 1. Category wise duration total for a user for a week. 2. Category wise duration total for a user for each of the 7 days of the week. 3. Total
2006 Jul 29
2
Finding sum
# Get a list of product ids from a form, then # sum the total price product_list = params[:product_ids] total = Product.find(product_list).sum(&:price) I understand the first list line and part of the second line, but what does the & symbol mean? TIA.
2006 May 19
0
Multiple Sum/Average/Max/etc in one query
Hi all, I was wondering how one does multiple sum/average/max/min in a single query using AR. It would be cool to be able to do: totals = Call.sum([:price,:duration], { :conditions => "destination = ''UK''", :group => "location" }) and end up with a hash with totals[:location][:colname] e.g.:
2005 Jan 06
0
Shaping the sum of in/out traffic (IMQ?)
Hello, does anyone have a working solution for the shaping both incoming and outgoing traffic in such way, that for a given class the sum of incoming and outgoing traffic is specified? My ISP does the same thing, it gives me just a line of a defined rate, no matter the traffic direction (i.e. here is the line, the clock speed is 1024kbps, do what you want). I''m a litte bit familiar
2005 Dec 30
3
Select SUM(?) Query
When using PHP, I was able to enter a query against my list of invoices such as : Select SUM(amount) from invoices where project="123" This would give me the total amount of all invoices for project 123. In rails, how would I do this? I tried using "find_by_sql," but couldn''t figure out how to extract the results out of this. Thanks!
2012 Nov 13
0
sum of squared loadings after varimax?
Is it possible to retrieve sums of squared loadings after applying varimax rotation? Here's the setup to my problem: I ran PCA using prcomp(). I then applied the Kaiser criterion to retain only the components having eigenvalues >= 1. (I know there's debate about the wisdom of that criterion, but I don't want to get sucked into that.) I then fed the reduced set of components to
2012 Oct 05
1
Setting the desired reference category with contr.sum
Hi, I have 6 career types, represented as a factor in R, coded from 1 to 6. I need to use the effect coding (also known as deviation coding) which is normally done by contr.sum, e.g. contrasts(career) <- contr.sum(6) However, this results in the 6th category being the reference, that is being coded as -1: $contrasts [,1] [,2] [,3] [,4] [,5] 1 1 0 0 0 0 2 0 1 0
2008 Jan 26
0
how to use anova() to test the sum of coefficients in nlme package
Dear R-help, In nlme package, anova () can be used to test the difference between two coefficients as shown on page 225 of "Mixed Effects Models in S and S-Plus": anova(fm2BW.lme, L = c("Time:Diet2" = 1, "Time:Diet3" = -1)) Now my question is instead of test the difference between two coefficients, can I use anova to test the significance of the sum of two
2008 Jan 05
2
Cumulative sum of vector
Hi, Maybe I have not been looking in the right spot, but, I have not been able to fine a command to automatically calculate the running cumulative sum of a vector. Is there such a command? Example of current code: > eig$values [1] 678.365651 6.769697 2.853783 > prop<-eig$values/sum(eig$values) > prop [1] 0.986012163 0.009839832 0.004148005 >
2007 Aug 29
0
sum(data.frame(),na.rm=TRUE) still throws an Error
Hello, sum(data.frame(),na.rm=TRUE) still throws an Error, is this really the intended behavior? > sum(data.frame()) Error in FUN(X[[1L]], ...) : only defined on a data frame with all numeric or complex variables > sum(data.frame(),na.rm=TRUE) Error in FUN(X[[1L]], ...) : only defined on a data frame with all numeric or complex variables The context is # x is a data frame generated from
2005 Dec 08
0
SF Beer & Dim Sum SIG (12/28) - !change of venue!
It turns out that the Long Island Chinese Restaurant has (a) moved and (b) changed its name (to "Wild Pepper"). So, please visit the SIG''s page (http://cfcl/rdm/beer_and_pizza) for new directions! -r -- email: rdm-go8te9J4rpw@public.gmane.org; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser,