Displaying 20 results from an estimated 4000 matches similar to: "for/if loop"
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
2018 Mar 16
3
Discrepancy: R sum() VS C or Fortran sum
Hi all,
I found a discrepancy between the sum() in R and either a sum done in C
or Fortran for vector of just 5 elements. The difference is very small,
but this is a very small part of a much larger numerical problem in
which first and second derivatives are computed numerically. This is
part of a numerical method course I am teaching in which I want to
compare speeds of R versus Fortran (We
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:
2014 Aug 10
2
Merging the DDL branch in nut-website
Hi Daniele and Arnaud,
While tracking down the Cyber Power voltage scaling issue, I found the DDL repository extremely helpful. Instead of searching across all of the old mailing list posts, I was able to run 'git grep' in the Cyber Power directory, and the consistency of the data made it an easy task.
I had a motherboard failure on my main computer, and I was trying to recreate the
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
2011 Jan 24
6
[LLVMdev] LLVM targeting HLLs
I am interested in using LLVM to translate C and C++ into high-level
language code. (As an update to an earlier project of mine, Clue, which
used the Sparse compiler library to do this: it targets Lua, Javascript,
Perl 5, C, Java and Common Lisp, with a disturbing amount of success.
See http://cluecc.sourceforge.net for details.)
The obvious place to start on this is the C backend, except in
2014 Aug 10
0
Merging the DDL branch in nut-website
> Is this the current layout?
>
> nut-website (branch: dll-hll)
> \__ nut submodule (branch: master)
> \__ ddl submodule (branch unknown?)
nut-website (branch: dll-hll)
\__ nut submodule (branch: master @ abc0006 [not updated to avoid
conflicts when merging back to master])
\__ ddl submodule (branch: master @ bbfd79f; now updated to ab6166c)
> The "ddl" branch
2011 Jan 24
0
[LLVMdev] LLVM targeting HLLs
On Jan 24, 2011, at 2:01 PM, David Given wrote:
> I am interested in using LLVM to translate C and C++ into high-level
> language code. (As an update to an earlier project of mine, Clue, which
> used the Sparse compiler library to do this: it targets Lua, Javascript,
> Perl 5, C, Java and Common Lisp, with a disturbing amount of success.
> See http://cluecc.sourceforge.net for
2012 Nov 04
1
structural equations using sem package
Hello
I am using sem to look at the direct effect of one variable on another but i am uncertain if i am progressing correctly.
An example:
covar1<-? matrix(c(0.4,-0.2,3,-0.2 , 0.3,-2 , 3 ,-2 , 60), nrow=3,byrow=T)
rownames(covar1)<-colnames(covar1)<-c("endo","exo","med")
path1<-matrix(c(? ? "exo -> endo",? "g1", NA,
2011 Jan 25
0
[LLVMdev] LLVM targeting HLLs
David Given <dg at cowlark.com> writes:
> The obvious place to start on this is the C backend, except in these 2.8
> days the C backend is so hedged about with caveats I'm rather wary of
> basing anything on it. I also recall seeing comments here that it's due
> for a rewrite from scratch, and that various people were looking into
> it. Can anyone go into more detail
2007 Jun 29
1
[LLVMdev] LLVM assembly without basic block
Thank you for reminding me the notion of the basic block.
Of course, I know all the assembly takes the form of BBs and is divided into units of BB.
OK. It looks better for me to explain what I wanted to do more clear from the first.
Actually, I am working on emitting out an assembly of VM by using LLVM. LLVM assembly looks similar with this VM assembly except BB. The VM assembly does not have the
2009 Feb 09
1
[LLVMdev] overflow + saturation stuff
Are overflow behavior tags meant to enable the specification of a
particular instruction's required or presumed overflow behavior?
If a required overflow behavior, then it follows that the target must
correspondingly implement the behavior; neither natively or emulated?
If a presumed overflow behavior, is the target meant to preferably implement
or emulate the same; or is it merely meant to
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.
2006 Nov 17
2
[LLVMdev] Registering '-march=' option for LLC
2007 Oct 05
1
[LLVMdev] Instruction selector internals
Hi Evan
> > It looks
> > like that the instruction selector operates on actual DAGs, no
> > unDAGing to
> > trees seems to occur at any point.
> Instruction scheduler is responsible for turning a DAG into a list of
> instructions.
So unDAGing is applied by the instruction scheduler. At which points in the
compilation flow is the instruction scheduler run (i'm
2007 Jul 07
2
random sampling with some limitive conditions?
I want to gain thousands of random sampling data by randomizing the
presence-absence data. Meantime, one important limition is that the row and
column sums must be fixed. For example, the data "tst" is following:
site1 site2 site3 site4 site5 site6 site7 site8 1 0 0 0 1 1 0 0 0 1 1 1 0
1 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 1 0 1 0
2010 May 12
2
Reading R code help--Beginner
Hi, I am brand new to R and not familiar with the language, though I
have been reading the manuals and making some slow going progress. I am
working with some source code from a Global Vector Auto -Regressive
program written by Ranier Puhr from the R-forge group. I need help
interpreting the processes of the following code.
I am going to
post in parts since it's pretty long:
GVAR
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box
displayed at the top of the checkout as described in the tutorial and I
cannot seem to discover where I have erred.
The scaffold.css is copied from the pragmatic programmers site:
#--------------------------------------------------------------------
$ cat public/stylesheets/scaffold.css
body { background-color: #fff;
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;
2010 Jul 31
3
a problem
dear:
when I read a Excel file(exp-11),The R project give me a error ,Just like this:
??'datafile'
> write.foreign("exp-11.xls")
???list(df = df, datafile = datafile, codefile = codefile) :
??'datafile'
> write.foreign("exp-11.xls")
???list(df = df, datafile = datafile, codefile = codefile) :
??'datafile'
>