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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -