Displaying 20 results from an estimated 42 matches for "condtion".
Did you mean:
condition
2011 Sep 09
2
Passing in Condtions into Object
Hello,
I am trying to pass a conditional expression into an expression to be
evaluated when ever an R statement is called. For example:
get_unique_count <- function(df, select, field){
uniqs <- unique(subset(df, select)[field])
return (nrow(uniqs))
}
In this case select is a conditional statement year == 1980, and the
function would be called in the following manner:
2018 Mar 04
2
Change Function based on ifelse() condtion
Hi again,
I am looking for some way to alternately use 2 related functions,
based on some ifelse() condition.
For example, I have 2 functions mclapply() and lapply()
However, mclapply() function has one extra parameter 'mc.cores' which
lapply doesnt not have.
I know when mc.cores = 1, these 2 functions are essentially same,
however I am looking for more general way to control them
2018 Mar 04
0
Change Function based on ifelse() condtion
On 04/03/2018 10:39 AM, Christofer Bogaso wrote:
> Hi again,
>
> I am looking for some way to alternately use 2 related functions,
> based on some ifelse() condition.
>
> For example, I have 2 functions mclapply() and lapply()
>
> However, mclapply() function has one extra parameter 'mc.cores' which
> lapply doesnt not have.
>
> I know when mc.cores =
2006 Jan 23
5
dial out and message playback
Hi,
In a normal PBX environment a user usually calls in and IVR's are played
according to a predefined dialplan.
Iam trying to develop an application where asterisk dials out to a user and
initiates an IVR instead (please note that the IVR is not static and may
vary according to different condtions).
Can someone guide me how this is possible using Asterisk. Do I need to write
some sort of AGI or application?
I have looked into the autodial out feature but I am thinking of a more
flexible or optimal solution.
Any help will be appreciated.
Regards,
Danish
-------------- next part ------------...
2018 Mar 04
0
Change Function based on ifelse() condtion
Hi Christofer,
You cannot assign to list(...). You can do the following
myList <- list(...)[!names(list(...)) %in% 'mc.cores']
HTH,
Eric
On Sun, Mar 4, 2018 at 6:38 PM, Christofer Bogaso <
bogaso.christofer at gmail.com> wrote:
> Hi,
>
> As an example, I want to create below kind of custom Function which
> either be mclapply pr lapply
>
> Lapply_me =
2006 Apr 03
1
How to handle failed finds.
What''s the best way to handle a find that doesn''t find anything?
For example.
Model Foo
@result = Foo.find(:first, :condition => "some condtion string").name
if the condition is not met Foo.find stops the application with ''unexpected
nil''.
What is the best way to gracefully trap this error and return something
meaningfull to the calling method?
--
Best Regards,
-Larry
"Work, work, work...there is no satisfac...
2012 Aug 25
6
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hello All,
I want to dertermine whether a basicblock is in a conditional branch. such as,
//=============================
if a > 2 // BasicBlock A
then
BasicBlock B
endif
BasicBlock C
//=============================
What I want to identify is BasicBlock B, which is in a condtional
block. but C is not.
In other words, I want to distinguish BasicBlocks that * must * be
executed and that *may* be executed.
CFG's iterator may not help, as LLVM IR br would be:
A:
br %cmp, %lable.B, %label.C
B
br C
C
both of the blocks could be operand of br instruction.
code in C...
2018 Mar 04
2
Change Function based on ifelse() condtion
Hi,
As an example, I want to create below kind of custom Function which
either be mclapply pr lapply
Lapply_me = function(X = X, FUN = FUN, ..., Apply_MC = FALSE) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
list(...) = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, ...))
}
}
However when Apply_MC =
2018 Mar 04
0
Change Function based on ifelse() condtion
Hi Christofer,
Before you made the change that I suggested, your program was stopping at
the statement: list(...) = list(..) .etc
This means that it never tried to execute the statement:
return(lapply(X,FUN,...))
Now that you have made the change, it gets past the first statement and
tries to execute the statement: return(lapply(X,FUN,...)).
That attempt is generating the error message because
2012 Aug 25
2
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
...b = 0;
> if (a == 0)
> Y = 0;
> if (b == 1)
> Y = 1;
> // in the end Y = X
> if(X == Y)
> BasicBlock C
> endif
>
> BasicBlock D
>
> In this example BasicBlock C is *must* executed, however it's hard to detect that it is.
Yes, the precise execution condtion may be difficut to get. I just
want rough results.
Thanks for your suggestion!
>
> --
> Yaroslav Markov
> PhD student in Computer Science
> Stony Brook University
> ________________________________________
> From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu...
2018 Mar 04
0
Change Function based on ifelse() condtion
That's fine. The issue is how you called Lapply_me(). What did you pass as
the argument to FUN?
And if you did not pass anything that how is FUN declared?
You have not shown that in your email.
On Sun, Mar 4, 2018 at 7:11 PM, Christofer Bogaso <
bogaso.christofer at gmail.com> wrote:
> My modified function looks below :
>
> Lapply_me = function(X = X, FUN = FUN, Apply_MC =
2018 Mar 04
2
Change Function based on ifelse() condtion
@Eric - with this approach I am getting below error :
Error in FUN(X[[i]], ...) : unused argument (list())
On Sun, Mar 4, 2018 at 10:18 PM, Eric Berger <ericjberger at gmail.com> wrote:
> Hi Christofer,
> You cannot assign to list(...). You can do the following
>
> myList <- list(...)[!names(list(...)) %in% 'mc.cores']
>
> HTH,
> Eric
>
> On Sun, Mar
2008 Jul 01
2
if one of 4 conditions is not satisfied
I'm trying to do realize the following:
I have 4 condtions.
If all conditions are satisfied I will paste("PASS")
If any of these is not satisfied I will paste("FAIL"). But I have to paste
the corresponding failure.
ifelse is a good solution but for a 2 conditions. Maybe switch or something
like this.
Does anyone have an idea how to d...
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
...mp28 ; <i32> [#uses=1]
ret i32 %tmp4
}
Surely the loop trip count is 256, but the Loop::getTripCount() will return
NULL.
This is due to the exit condition:
%tmp16 = icmp slt i32 %tmp13, 0 ; <i1> [#uses=1]
pass indvars should transform it into a canonical exit condtion EQ or NE,
but as scalarevolution returned NonComputedItCount, it failed to do that.
In pass ScalarEvolution three algorithms failed to compute the trip count:
1. In SCEVAddRecExpr::getNumIterationsInRange(), as the loop stride is
negative, the exit value expression will be zero: (Here A is the st...
2018 Mar 04
2
Change Function based on ifelse() condtion
My modified function looks below :
Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
myList = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, myList))
}
}
Here, I am not passing ... anymore rather passing myList
On Sun, Mar 4, 2018 at 10:37 PM,
2007 Jun 12
4
pretty report
Dear Listers:
I have a couple of data frames to report and each corresponds to
different condtions, e.g. conditions=c(10, 15, 20, 25). In this
examples, four data frames need to be exported in a "pretty" report.
I knew Perl has some module for exporting data to Excel and after
googling, I found R does not.
So I am wondering if there is a package in R for generating good
reports. I f...
2012 Aug 25
0
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
...ditional branch
Hello All,
I want to dertermine whether a basicblock is in a conditional branch. such as,
//=============================
if a > 2 // BasicBlock A
then
BasicBlock B
endif
BasicBlock C
//=============================
What I want to identify is BasicBlock B, which is in a condtional
block. but C is not.
In other words, I want to distinguish BasicBlocks that * must * be
executed and that *may* be executed.
CFG's iterator may not help, as LLVM IR br would be:
A:
br %cmp, %lable.B, %label.C
B
br C
C
both of the blocks could be operand of br instruction.
code in C...
2006 May 12
1
Some error about adding.
Ok so I''m trying to make a little exchange 3 for 1 of 1 higher rank here
is the code in the controller:
def exch_link
@id = @session[:user].id
@type = @params[:type]
exch(@id,@type)
end
def exch(user_id,this_type)
@user = User.find(:condtions => "id = " + user_id)
@ranks = ["xw","w","m","l","xl","s","ss"]
if @user.send(this_type) >= 3
@this_type = @ranks.index(this_type)
@nexts_number = @this_type.to_i + 1
@next_type = @ranks[@nexts_number]
@user....
2006 Oct 24
1
set.seed() and .Random.number
...I want to make the 100th set of the
first condition and 1st set of the second conditon the same. What do I need
to do ?
After generating 99th set of 10 random numbers and then saving .Random.seed
then using .Random.seed for generating 100th set of the first condition and
1st set of the second condtion. Is this right?
.Random.seed is a vector with 626 numbers, but set.seed() only accepts a
integer number.
What do I need to do for saving .Random.seed and using the saved
.Random.seed for setting set.seed() ?
Thanks
Taka
_________________________________________________________________
Get FRE...
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
...unt is 256, but the Loop::getTripCount() will
>> > return NULL.
>> > This is due to the exit condition:
>> >
>> > %tmp16 = icmp slt i32 %tmp13, 0 ; <i1> [#uses=1]
>> >
>> > pass indvars should transform it into a canonical exit condtion EQ or
>> > NE, but as scalarevolution returned NonComputedItCount, it failed to do
>> > that.
>> >
>> > In pass ScalarEvolution three algorithms failed to compute the trip count:
>> >
>> > 1. In SCEVAddRecExpr::getNumIterationsInRange(), as...