search for: calcuation

Displaying 20 results from an estimated 47 matches for "calcuation".

Did you mean: calculation
2010 Jun 29
2
How to delete rows based on replicate values in one column with some extra calcuation
Hi, folks, Please let me address the problem by the following codes: first=c('u','b','e','k','j','c','u','f','c','e') second=c('usa','Brazil','England','Korea','Japan','China','usa','France','China','England') third=1:10
2010 Aug 23
3
DNA sequence Fst
Hi, I want to analyse DNA sequence data (mtDNA) in R as in calculate Fst, Heterozygosity and such summary statistics. Package Adagenet converts the DNA sequence into retaining only retaining the polymorphic sites and then calcuates Fst.. but is there any other way to do this? I mean analyse the DNA sequence as it is.. and calculate the statistics? Thanks! [[alternative HTML version deleted]]
2008 Dec 26
2
Computational Probability
...robability that the sum of 10 iid uniform variables [0,1] will be between 4 and 6, (i..e Pr( 4 < \sum_{i=1}^{10}X_i < 6)), I can type: X := UniformRV(0, 1); Y := ConvolutionIID(X, 10); CDF(Y,6) - CDF(Y,4); which gives the required probability .7222. Is there any way to perform these type of calcuations in R in a general way? I realise that a lot of the machinery behind these computations comes from Maple's symbolic engine, but are there any R extensions for these kind of calculation? Cheers Rory [[alternative HTML version deleted]]
2006 Jun 14
3
appending
All, In the function below I have 24 individuals and 6 calculations per individual. The 6 calculations are collected each time in a 1:24 loop when calculating "delta". I'd like to collect all 144 = 24*6 calculations in one vector ("delta.patient.comb"). The function works as is via indexing, but is there an easier way to collect the measurements via appendinng the 6
2008 Jul 11
3
number of effective tests
Dear R community, I am using 6 variables to test for an effect (by linear regression). These 6 variables are strongly correlated among each other and I would like to find out the number of independent test that I perform in this calcuation. For this I calculated a matrix of correlation coefficients between the variables (see below). But to find the rank of the table in R is not the right approach... What else could I do to find the effective number of independent tests? Any suggestion would be very welcome! Thanking you and with my b...
2008 Nov 14
1
# values used in a function in tapply
Hello, I am using tapply to pull out data by the day of week and then perform functions (e.g. mean). I would like to have the number of values used for the calcuation for the functions, sorted by each day of week. A number of entries in any given column are NAs. I have tried the following code and simple variants with no luck. for (i in 1:length(a[1,])){ x<-tapply(a[,i],a[,1],mean, na.rm=TRUE) amn<-tapply(a[,i],a[,1],colSums(!is.na),na.rm=T)} Adding a...
2011 May 11
1
foreach(): how to do calculations "between" two foreach loops?
Dear expeRts, is it possible to carry out calculations between different foreach() calls? As for nested loops, you want to carry out calcuations not depending on the inner loop only once and not for each iteration of the innermost loop. Cheers, Marius library(foreach) foreach(i=1:3) %:% foreach(j=1:2) %do% { i <- i+1 print(paste(i,j)) } foreach(i=1:3) %:% i <- i+1 # lengthy calculation which has to b...
2007 Mar 19
1
Wine FileMaker 6.0 Calculated Date Fields
I am running FileMaker 6.0 via Wine on Ubuntu 6.10. I have a file/ table/whatever it is called Case.fp5 and another table called Actions.fp5. Case is a one to many relationship to Actions, related via the CaseID. Date Closed is calculated in Case: If Last(Actions::Action Type) = "Close" then Date Closed = Last(Actions::Date Created) (something like that since I can't actually see
2005 Jan 27
1
[LLVMdev] Question about inserting IR code
Hi, From the file HowToUseJIT.cpp, I learned how to insert some calcuation IR code like Add/Sub/Mul etc by using Instruction *Add = BinaryOperator::createAdd(One, ArgX, "addresult", BB); By following this way, it works well when I insert some IR code whose operand is integer type like IntTy, however, when I tried to insert similar thing whose operands are f...
2011 Mar 13
1
using pre-calculated coefficients and LP in coxph()?
I need to force a coxph() function in R to use a pre-calculated set of beta coefficients of a gene signature consisting of xx genes and the gene expression is also provided of those xx genes. If I try to use "coxph()" function in R using just the gene expression data alone, the beta coefficients and coxph$linear.predictors will change and I need to use the pre-calcuated linear predictor
2010 Aug 18
1
ask for help about netcdf
hi,r project I am a new user who has some questions about r tool,I have some original data file in netcdf format which is a famous geometry data file format, The file contains very large weather information from every zone of the world,I want to extract only a part of them to calcuate, like the information in a city or the information between exact latitute range and longtitude range, can r tool
2012 Aug 23
1
Why was my R process killed spontaneously?
I tried to use gpuCor function in the gputools package of R to calcuate the pairwise correlations of a matrix of 40,000 columns. Becuase there would be memory issues if I use the whole matrix at a time, I splitted the matrix into submatrix of 10,000 columns and then calculate the pairwise correlation of different submatrices. There are altogether 4 submatrices, so I need to calculate the pearson
2008 Aug 26
2
Problem with Integrate for NEF-HS distribution
I need to calcuate the cumulative probability for the Natural Exponential Family - Hyperbolic secant distribution with a parameter theta between -pi/2 and pi/2. The integration should be between 0 and 1 as it is a probability. The function "integrate" works fine when the absolute value of theta is not too large. That is, the NEF-HS distribution is not too skewed. However, once the
2006 Sep 12
1
Kendall's tau-c
Hello, I can't find a package which calculates Kendall's tau-c. There is the package Kendall, but it only calcuates Kendall's tau-b. Here is the example from ttp://www2.chass.ncsu.edu/garson/pa765/assocordinal.htm. cityriots <- data.frame(citysize=c(1,1,2,2,3,3), riotsize=c(1,2,1,2,1,2), weight=c(4,2,2,3,0,4)) cityriots <- data.frame(lapply(cityriots,function(x)
2012 Oct 13
2
Function hatTrace in package lme4
Dear all, For a project I need to calculate the conditional AIC of a mixed effects model. Luckily, I found a reference in the R help forum for a function to be used: CAIC <- function(model) { sigma <- attr(VarCorr(model), 'sc') observed <- attr(model, 'y') predicted <- fitted(model) cond.loglik <- sum(dnorm(observed,
2012 Apr 26
2
Memoize and vectorize a custom function
My goal is simple: calcuate GC content of each sequence in a list of nucleotide sequences. I have figured out how to vectorize, but all my attempts at memoization failed. Can you show me how to properly memoize my function? There is a StackOverflow post on the subject of memoization, but it does not help me: http://stackoverflow.com/questions/7262485/options-for-caching-memoization-hashing-in-r
2008 Nov 26
1
survreg and pweibull
..., why does the inflection point of this curve not match up to the exp(scale parameter)? Am I wrong in assuming that the scale represents the inflection, and the shape adjusts the shape around this point? I think I am.... perhaps confusing the scale and the median with the inflection point calcuation? One can visualise the mismatch with: abline(v=exp(coef(lung.wbs)),lty=2) abline(h=0.5,lty=2) Many thanks for the clarification.... R version 2.8.0 (2008-10-20) i386-apple-darwin8.11.1 locale: en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] splines datasets ut...
2007 Apr 25
1
help
Hi all, I have 2 questions: 1)How do I calculate the mean on an imported txt file? I've imported the file below and that's what it looks like imported. How do I then calcuate the mean, median, or mode on the column LeafArea using the desktop R package? Any help would be greatly appreciated!! Thanks, Nat LeafType Leaflets LeafArea ShapeRatio LeafWeight LeafThickness 1 1
2009 Sep 13
1
Manage an unknown and variable number of data frames
...on and I don't know how to manage them as a collection. How do experience R coders handle keeping all this straight so that if I add another column from dat and more groups in the cuts it all stays straight? I need to send each dataf rame to another function to add columns of specific data calcuations to each of them. Best for me (I think) would be to enumerate each data frame using the row.name number from CutTable if possible, but that's just my thought. If each data frame became an element of CutTable then I'd always know where they are. Really I'm needing to get a handle on...
2002 Dec 29
3
lowess + turnpoints = doubling integers?
Happy New Year, r-helpers! I am using lowess to smooth a scatter plot, xx<-lowess(xinput,f=.04) #defaults for other args followed by turnpoints(xx$y) #defaults for other args I plot the smoothed result as well as turnpoints (using yy$tppos) on top of raw data plot. Result is exactly as expected, graphically. For another purpose, I calcuate the difference between turnpoints (representing