Displaying 20 results from an estimated 3000 matches similar to: "local variables (PR#6436)"
2004 Mar 10
1
Question concerning library function "nlme" and lexical scoping
I am running into problems calling the library function nlme from within
another function. Basically,the following function (with v a list
containing data and initialization values)
> testfunc
function(dat=v) {
test<-nlsList(result~a+(b-a)/(1+(conc/(c+z*cdiff))^d)
|rep,start=dat$init,data=dat$mixeddat)
return(nlme(test,random=b~1))
}
produces the error message
Error in eval(expr, envir,
2003 Jul 21
4
generate a series of fucntion
Hi there,
I want to generate a large amount of functions,
say f=function(x,t) exp(-t[1]-t[2]*g_1(x)-t[3]*g_2(1+x))
where g_1(x) and g_2(x) are from a long list of moments, such as x, x^2,
log(x), log(1+x) .. and so on.
Any suggestions on how to do this efficiently?
thanks a lot.
x.w
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
hi all,
i would like insert a fucntion call at the end of each basic bloc
the fucntion i have defined and declared at the begining of the module
ie i have written a pass derived from a module pass
virtual bool runOnModule(Module & M){
// i declared the fucntion and defined it
for (Module::iterator a = M.begin(), b = M.end(); a != b;
for (Function::iterator i = a->begin(), e =
1998 Aug 24
1
R-beta: Segmentation fault
Dear everyone,
I'm doing some simulations which involves bootstrapping
(using functions written in c loaded with R's dyn.load()
function) and maximising the likelihood function with R's
nlm() function. I used to run my code in S-plus but because
I frequently ran out of memory (because of S-plus' silly
memory management), I decided to try porting my code to R.
In R (on a linux
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/25 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
> > i would like insert a fucntion call at the end of each basic bloc
>
> you can't, because only terminators are allowed at the end of a basic
> block.
> However you can try to insert the call before the terminator.
>
Yes, i mean before the termininator,
My problem is how to call a method
suppose
2008 Nov 10
6
Variable passed to function not used in function in select=... in subset
Hello!
I have the problem that in my function the passed variable is not used, but the variable name of the dataframe itself?- difficult to explain, but an easy example:
TestFunc<-function(df, group) {
??? print(names(subset(df, select=group)))
}
df1<-data.frame(group="G1", visit="V1", value=0.9)
TestFunc(df1, c("group", "visit"))
Result:
[1]
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> My problem is how to call a method
> suppose this fucntion
> void A(int x)
> {
> x=x+1;
>
> }
>
> should i define this function and declare it at the beginig of the module and
> create for it a basic bloc?
you can just declare the function (i.e. no need to give it a body), and call it.
You can then link with an object file that defines it. This is
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
I have defined the fucntion in another object file and linked it to the
in fact the fucntion is :
void consume(int , int * );
std::vector<Value*> int32_16_params;
int32_16_params.push_back(inValue);//inValue is ConstantInt* inValue
int32_16_params.push_back(gvar_int32_y);
CallInst* int32_16 = CallInst::Create(func_consume, int32_16_params.begin(),
int32_16_params.end(), "",
2005 Sep 18
3
Attaching effects during onload
I''m trying to attach effects to elements in my onload handler and my
lack of Javascript-fu is showing... I want to call the effect from
the onclick handler of an anchor inside the div I want the effect to
apply to. Here''s what I''m trying to do:
function doOnLoad() {
var filters = document.getElementsByName(''filter'');
for
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> i would like insert a fucntion call at the end of each basic bloc
you can't, because only terminators are allowed at the end of a basic block.
However you can try to insert the call before the terminator.
...
> i tried to see an example with the demo, i saw that it instead of calling the
> function, it repeats all the instruction that are existing in the function
>
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
>
> Now when i tried this pass an error says:
>> Wrong type for attribute noalias
>> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you
2011 Sep 03
3
question with uniroot function
Dear all,
I have the following problem with the uniroot function. I want to find
roots for the fucntion "Fp2" which is defined as below.
Fz <- function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)}
Fp <- function(t){(1-Fz(abs(qnorm(1-(t/2)))))+(Fz(-abs(qnorm(1-(t/2)))))}
Fp2 <- function(t) {Fp(t)-0.8*t/alpha}
th <- uniroot(Fp2, lower =0, upper =1,
2009 Jan 08
2
VaR-Monte carlo Simulation, Historic simulation, Variance-Covariance Simulation
Dear R helpers
Suppose I have a portfolio of securities with exposure to Equity, Bonds and Forex (say $ 1000000 each).
Is there any fucntion in R that will help me calculate Value at Risk (VaR) using Monte carlo Simulation , Historic simulation and Variance - Covariance Simulation.
With regards
Maithili
2005 Jun 27
2
Reconstructing LD function
Dear all,
in an LDA analysis with n groups n-1 LD functions result. Implicitly this
defines an LD fucntion for the last group. Does there exist code already
to explictly construct this LD function?
Thanks, Stefan
2011 Feb 02
2
matrix and a function - apply function
Hi
I have this function and this matrix:
function(x,y) x+y/x
m<-matrix(c(1,2,4,2,10,8),3,2)
> m
[,1] [,2]
[1,] 1 2
[2,] 2 10
[3,] 4 8
each row represent a point (x,y) in a chart and I want via my fucntion to
calculate the image in order to get this results:
for point (1,2) I would get 1+2/1 = 3
for point (2,10) I would get 2+10/2 = 7
for point (4,8) I would get
2005 Nov 16
2
Newton-Raphson
Dear all,
I want to solve a score function by using Newton-Raphson algorithm. Is there such a fucntion in R? I know there's one called optim, but it seems only doing minimizing or maximizing.
Thanks,
Jimmy
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script
from within that script.
fir instance
If I have a script "myscript.r":
FileName<-unknown.fucntion()
print(FileName)
and run it
source("myscript.r")
will return
"myscript.r"
Thanks
Nevil Amos
[[alternative HTML version deleted]]
2004 Mar 11
5
fft question
Hi!
I am using the fft() function the base package to transform some 1d signal.
If I use this standar fucntion I get a very huge first fourier coeficient.
I think this dues to the handling of the borders of the signal.
Usually in fft especially in image processing the signal is simulated to be continuous by adding the signal several times periodically. My question is, is there some function
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> Now when i tried this pass an error says:
> Wrong type for attribute noalias
> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you correct
> your code that adds the attribute.
2015 Jun 18
3
[LLVMdev] Attribute to mark that function only access memory through it's arguments
Hi,
Currently in AliasAnalysis we can model ModRef behaviour for functions which
only access memory through their pointer arguments. However we can't
express this propery as a function attribute.
For example, for intrinsics we can specify ReadWriteArgMem or ReadArgMem
attributes in tablegen definitions. But due to the lack of the related function
attributes on the llvm ir level, this