Displaying 20 results from an estimated 4000 matches similar to: "Fucntion scope question. General non-linear solution help."
2008 Aug 05
1
optimize simultaneously two binomials inequalities using nlm( ) or optim( )
Dear R users,
I?m trying to optimize simultaneously two binomials inequalities (used in
acceptance sampling) which are nonlinear solution, so there is no simple
direct solution. Please, let me explain shortly the the problem and the
question as following.
The objective is to obtain the smallest value of 'n' (sample size)
satisfying both inequalities:
(1-alpha) <= pbinom(c, n, p1)
2006 Mar 22
4
pbinom( ) function (PR#8700)
Full_Name: Chanseok Park
Version: R 2.2.1
OS: RedHat EL4
Submission from: (NULL) (130.127.112.89)
pbinom(any negative value, size, prob) should be zero.
But I got the following results.
I mean, if a negative value is close to zero, then pbinom() calculate
pbinom(0, size, prob). dbinom() also behaves similarly.
> pbinom( -2.220446e-22, 3,.1)
[1] 0.729
> pbinom( -2.220446e-8, 3,.1)
2019 Jun 21
3
Samba winbind on centos 7 - "domain users" acls added
hello,
My 2nd issue is about acls which are added by "Domain users".
May you help me to solve it again ?
Concerning this issue, on my samba share, I set permissions for the
share "groups" located on /var/datashared for "domain admins" (rwx) and
"domain users" (r-x)
/var]# getfacl datashared/
# file: datashared/
# owner: root
# group: root
user::rwx
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod.
First, I define testFunc, which sorts a data frame by the first column and
returns the entries that aren't NAs, and testIt, which runs testFunc
repeatedly on a random large data frame, each time saving the return into a
dummy placeholder (for demonstration's sake).
> require(methods)
Loading required package: methods
[1] TRUE
> testFunc
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod.
First, I define testFunc, which sorts a data frame by the first column and
returns the entries that aren't NAs, and testIt, which runs testFunc
repeatedly on a random large data frame, each time saving the return into a
dummy placeholder (for demonstration's sake).
> require(methods)
Loading required package: methods
[1] TRUE
> testFunc
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 =
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi,
I am trying to compile a FORTRAN program to call from R under Windows 7 but
I am having problem in the compiling step. To demonstrate this is the
program testit.f:
------------------------------------------
subroutine TESTIT(x,n,m)
dimension x(n)
do 10 i=1,n
10 x(i)=x(i)**m
end
--------------------------------------------
When I compile it with gfortran I get
2018 Feb 15
3
using cat to log to file with sapply
Hi List,
I am trying to write unsuccessfully to a logfile with cat. Here my example code:
letters[1:5]->x
logf<-"test.txt"
cat('%%%%%%%%%%%%%%%%%%%%%%%%%%\n',file=logf)
catf<-function(x,...,logfile='log.txt', append=TRUE){ cat(x,'\n', file=logfile, append=append)}
testit<-function(x,...){
paste0('this is x: ',x)->y
return(y)
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 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
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.
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(), "",
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.
Ciao, Duncan.
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
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
2009 May 20
3
qbinom (PR#13711)
Full_Name: Wolfgang Resch
Version: R 2.8.1 GUI 1.27
OS: OS X 10.4.11
Submission from: (NULL) (137.187.89.14)
Strange behavior of qbinom:
> qbinom(0.01, 5016279, 1e-07)
[1] 0
> qbinom(0.01, 5016279, 2e-07)
[1] 16
> qbinom(0.01, 5016279, 3e-07)
[1] 16
> qbinom(0.01, 5016279, 4e-07)
[1] 16
> qbinom(0.01, 5016279, 5e-07)
[1] 0
2009 Jun 10
0
smooth.spline() fucntion
Hi, all, I found that the smooth.spline() function produces different results between R and S-Plus. I was trying to play different parameters of the function without any success. The script of the function contains Fortran code, so it seems impossible to port the code from S-Plus to R (or I may be wrong). Can anyone suggest anything so that I can produce the same result in R as in S-plus?
Thanks
2006 Aug 29
1
forestplot fucntion in rmeta package
Dear R users,
I would like to adjust the x axis the way I wanted using
"forestplot(labeltext, mean, lower, upper, align = NULL, xlab = "", zero =
0, graphwidth = unit(2, "inches"), col = meta.colors(), xlog = FALSE)". I
tried using xaxt="n" and then redefine the axis using axis(1, at=c(0,0.5,1.0
,1.5,2.0,2.5),label=c(0,0.5,1.0,1.5,2.0,2.5)), but it
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as
expected
n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes
severe problems
I cannot interrupt using ESC and I finally have to resort to the Windows
Task manager to kill the R session.
A friend of mine told me that he faced similar problems under Unix.
--please do not edit the information below--
Version:
2001 May 09
1
Fortran subroutines dblepr, realpr, intpr
I am making my first attempts at using some Fortran code with R, and
so far it's going OK. To print from my Fortran programs, it seems I
need subroutines dblepr, realpr and intpr. From the excellent
"Writing R Extensions" document:
"Three subroutines are provided to ease the output of information
from FORTRAN code.
subroutine dblepr(label, nchar, data, ndata)