I wish to assign value to a variable Value[1] using the following if condition. B123 is value that exists in dataframe Hello under column "Code"
IF(B123>10000,C456*D567,0)
Value[1]<-ifelse(Hello$Code[Hello$Code=='B123']>10000, Hello$Code[Hello$Code==C456]*Hello$Code[Hello$Code==D567],0)
This does not work
Aucun commentaire:
Enregistrer un commentaire