Displaying 7 results from an estimated 7 matches for "sumc".
Did you mean:
sum
2009 Jan 28
3
for/if loop
...else
{
hll(pp,1)=ColSums(lselb1(rr:ii,1))
hll(pp,2)=ColSums(lselb2(rr:ii,1))
rr=ii
pp=pp+1}
}
}}}
in fact I have the corresponding Gauss code here. But I really don't know
how to write such loop in R.
rr=1;
ii=1;
pp=1;
do until ii==n+1;
if pan[ii,1] ne pp;
hll[pp,1]=sumc(lselb1[rr:ii-1,1]);
hll[pp,2]=sumc(lselb2[rr:ii-1,1]);
rr=ii;
pp=pp+1;
endif;
if ii==n;
hll[pp,1]=sumc(lselb1[rr:ii,1]);
hll[pp,2]=sumc(lselb2[rr:ii,1]);
rr=ii;
pp=pp+1;
endif;
ii=ii+1;
endo;
--
View this message in context: http://www.nabble.com/for-if-loop-tp21701496p21701496....
2018 Mar 16
3
Discrepancy: R sum() VS C or Fortran sum
...[-5]*p[-5]))/p[5])
u <- a^(1/s)*x^((s-1)/s)
dyn.load("sumF.so")
u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0
s1 <- sum(u)
s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1),
sf2=double(1))[3:4]
s3 <- .C("sumc", as.double(u), as.integer(n), sC=double(1))[[3]]
s1-s2[[1]] ## R versus compiler sum() (Fortran)
[1] -7.105427e-15
s1-s2[[2]] ## R versus manual sum (Fortran
[1] -7.105427e-15
s1-s3 ## R Versus manual sum in C
[1] -7.105427e-15
s2[[2]]-s2[[1]] ## manual sum versus compiler sum() (Fortr...
2018 Mar 16
1
Discrepancy: R sum() VS C or Fortran sum
...load("sumF.so")
>>
>> u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0
>> s1 <- sum(u)
>> s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1),
>> sf2=double(1))[3:4]
>> s3 <- .C("sumc", as.double(u), as.integer(n), sC=double(1))[[3]]
>>
>> s1-s2[[1]] ## R versus compiler sum() (Fortran)
>>
>> [1] -7.105427e-15
>>
>> s1-s2[[2]] ## R versus manual sum (Fortran
>>
>> [1] -7.105427e-15
>>
>> s1-s3 ## R Versus manual su...
2018 Mar 16
0
Discrepancy: R sum() VS C or Fortran sum
...s)*x^((s-1)/s)
> dyn.load("sumF.so")
>
> u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0
> s1 <- sum(u)
> s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1),
> sf2=double(1))[3:4]
> s3 <- .C("sumc", as.double(u), as.integer(n), sC=double(1))[[3]]
>
> s1-s2[[1]] ## R versus compiler sum() (Fortran)
>
> [1] -7.105427e-15
>
> s1-s2[[2]] ## R versus manual sum (Fortran
>
> [1] -7.105427e-15
>
> s1-s3 ## R Versus manual sum in C
>
> [1] -7.105427e-15
>...
2005 Jun 28
1
faster algorithm for Kendall's tau
Hi,
I need to calculate Kendall's tau for large data
vectors (length > 100'000).
Is somebody aware of a faster algorithm or package
function than "cor(, method="kendall")"?
There are ties in the data to be considered (Kendall's
tau-b).
Any suggestions?
Regards
Ferdinand
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
Hi Developers,
I am looking for another new project to help me get more up to speed
on R and to learn something outside of R internals. One recent R
issue I have run into is finding a fast implementations of the
equivalent to the following SAS code:
/* MDPC is an integer sort key made from two integer columns */
MDPC = (MD * 100000) + PCO;
/* sort the dataset by the key */
PROC SORT;
2009 Jan 28
2
t.test in a loop
Hi All,
I've been having a little trouble with creating a loop that will run a a
series of t.tests for inspection,
Below is the code i've tried, and some checks i've looked at.
I've used the get(paste()) idea as i was told previously that the use of the
eval should try and be avoided.
I've run a single syntax to check that my systax is correct and works
without any problems