Skip to main content

Questions tagged [conditional-statements]

"In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false. Apart from the case of branch prediction, this is always achieved by selectively altering the control flow based on some condition." -- Wikipedia

conditional-statements
0 votes
0 answers
13 views

How do I find a word in a string in Pinescript?

I am trying to use the following code and it is saying "Could not find function or function reference 'str.contains". r= "RSI", cond = str.contains(divergence_text_bottom,r) Thanks ...
OnePlusTwo's user avatar
1 vote
2 answers
43 views

How to select the row with specific condition and the row just above? [closed]

Here is how I defined my condition , but I need the row just above as well. There are many observations per ID. data2<- data2 %>% group_by (ID_number) %>% filter(time_diff_hour > 8....
Asma's user avatar
  • 11
0 votes
0 answers
8 views

How can I set an alert on a condition met in an array in Pinescript

I have an array that is being set with divergences. What I want to do is add a conditional statement for IF the array contains cwmacd and macd together and another one that checks IF the array ...
OnePlusTwo's user avatar
2 votes
4 answers
88 views

Conditional mutate based on order of variables

I have vectors that index the events A, B, C. Each event occurs at least once but can occur multiple times. For example: Sequence 1: c("A", "B", "C") Sequence 2: c("...
gregor-fausto's user avatar
-1 votes
1 answer
28 views

Using multiple conditions using bash Test [duplicate]

I'm using the following bash Test for one condition and it's working correctly [[ $# == 1 ]] || { echo "Syntax: $0 arg1"; exit 1; } But when I try to use 2 conditions like the following: [[ ...
Diego Alejandro Gómez Pardo's user avatar
1 vote
1 answer
30 views

MS Excel - Count rows where multiple columns meet different criteria

I am trying to automatically count samples that pass or fail based on multiple criteria. Countifs works beautifully for the pass condition where all criteria must be passed, but I'm struggling with ...
brummel's user avatar
  • 51
-1 votes
4 answers
61 views

removing values in pandas according to condition

In pandas dataframe I want to remove the row with duplicate employee id but accoridng to the condition where the salary is null my original data is EEID Name gender salary 0 EMP01 ayushi ...
vasu's user avatar
  • 1
0 votes
0 answers
7 views

Configure check for multiple condition

ALL, I have 3 different options to check with configure: --with-X1 --with-X2 --with-X3 If tye user is not supplying any of them I want to output a warning stating that the default value will be used. ...
Igor's user avatar
  • 5,906
0 votes
0 answers
42 views

what is the better way to add conditional routing in rails

I have to change the route in a way that I need to have the original route as well as change the path of the route in a env is available. this is how I am thinking of doing custom_org = ENV['...
Burhan Gardezi's user avatar
0 votes
0 answers
41 views

How to call an R function conditional on a printed string?

I'm using the tesseract package to mine text from a very large (>500K) set of scanned documents. Some of the documents are rotated the wrong way, so when I call tesseract::ocr on those, the ...
Jake's user avatar
  • 117
0 votes
0 answers
14 views

Replicating IF ANY conditional logic or a SUMIF Equivalent in PeopleSoft Query

Setting up an expression with conditional logic to determine the type of requisition within our business logic. Some requisitions can have multiple REQ_LINE.LN_TYPE (e.g. Req Line 1 = CAT & Req ...
Aher's user avatar
  • 1
-2 votes
1 answer
68 views

How to set values in a dataframe column that depends if another column value is bigger than a dict/lookup table

I have a dataset with date and id columns, and I want to set a third column 'Status' where if the date is before the value in the dict/lookup table, then 'On', 'Off' if on or after the date. For ...
yungkenny's user avatar
0 votes
1 answer
31 views

How to filter based on column data for each individual subject for a data set with multiple observations for multiple subjects? [closed]

I am quite new to R so apologies if this is obvious but I have been unable to find an answer to this elsewhere, or perhaps I've not found the words to ask the right question! I have a dataset that ...
user26225831's user avatar
0 votes
1 answer
30 views

The return type 'Null' isn't a 'University', as required by the closure's context

I'm stuck trying to test my code. but I get the error that "The return type 'Null' isn't a 'University', as required by the closure's context. Any suggestions on how to fix this? Here's the code: ...
janea's user avatar
  • 3
0 votes
0 answers
6 views

Coding and Plotting Haar Wavelet

I am trying to plot Haar Wavelet function using the code below: #define the t variable #define the range of the time domain L = 10 #Define the number of points in the time domain n = 100 #define the ...
User123's user avatar
  • 29

15 30 50 per page
1
2 3 4 5
1290