If statements with variables in the form of words in r -


this incredibly simple question. if have variable defined word such as:

variable1 = 'returns' 

this later edit (i.e. change 'returns' 'revenue').

i want execute particular block of code provided variable 'returns'. why r tell me cannot use = sign when try:

if(variable1 = 'returns'){ #code go here } 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -