Displaying 20 results from an estimated 47 matches for "calcuat".
Did you mean:
calcuate
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
...surements via appendinng the 6 measurements each time to
the current set? I couldn't find anything in Intro to R on appending.
cheers,
Dave
ps - please respond directly to afshar at miami.edu
creatine.function.new = function(delta.0.Y.0, gamma, comp.LIS.frm,
comp.CAND.frm) { ## function to calcuate the delta.i, i.e. the percent
## leftover ## gamma = rate of Cr going into bucket, e.g., mg/hr ##
delta.0.Y.0 = product of delta.0 and Y.0 at baseline ##
Y.1 = delta.0.Y.0 + gamma
delta = numeric(6)
delta.patient = numeric(24)
delta.patient.comb = numeric(144)
##
for (k in 1:24) { ## each patien...
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 m...
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)}
Addin...
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 t...
2007 Mar 19
1
Wine FileMaker 6.0 Calculated Date Fields
...aving..).
When I search the Actions table by populating "Date Closed" in my Find
view with a date range (ex, 1/1/2007...1/31/2007) i return no
records. When I just use one value (ex, 1/1/2007) i return no
records. When I view my list of actions, the "Date Closed" is
correctly calcuated, and record DO exist that meet this criteria.
When I search on the native "Date Created" field (auto entered based
on when the record is created) it works fine. When I search on a
related field that is Text, it works fine. When I search on a related
calculated field that is text, it w...
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 ar...
2011 Mar 13
1
using pre-calculated coefficients and LP in coxph()?
...a
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 not re-computed using coxph()
function. The reason is I need to compute a quantity that uses as it's input
the coxph() output but I need this output to be pre-calculated
beta-coefficients and linear.predictor.
Any one can show me how to do this in R?
Thanks a lot.
[[alter...
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 help me to do that or in some point r tool is a statitcal software which focus on mathmatical caculation and the user have to translate the special data files into some data structure...
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...
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 t...
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)
rep(x,cityriots$weight)))
xtabs(~ ri...
2012 Oct 13
2
Function hatTrace in package lme4
...N-p)*(N-p-2)) +
N*(p+1)/((N-p)*(N-p-2))
CAIC <- -2*cond.loglik + 2*K.corr
return(CAIC)
}
Reference:
http://r.789695.n4.nabble.com/Using-Conditional-AIC-with-lmer-td847899.html
However, in this function the function hatTrace of the lme4 package was used
to calcuate rho
(line: rho <- hatTrace(model) )
Sadly, R tells me that this function could not be found. A search on the
internet revealed that this function was dropped out of the new package
release of lme4.
Can anyone help me with this? Is there an alternative function that gives me
the same result...
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://stackov...
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...
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 3 0.12 0.12 0.21 0.00
2 1 3 0.17...
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...
2002 Dec 29
3
lowess + turnpoints = doubling integers?
...wess 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
time intervals between turnspoints in my applicaiton), e.g.
aduration[j]<-yy$tppos[i+1]-yytppos[i]
This also appears to work as expected, HOWEVER, a typical list of such
differences looks like:
22,33,22,11,33,44,33,33,11,33,44,66,33,22,............