Hi,

I have a 60 column dataset, 2 of them are units of measurement, and the measured numbers respectively.

in order to convert the numbers into just 1 unit, I have to write some formula that when the units are in percentages in 1 column, the corresponding value in the column number will change, I do it as below:

ifelse(df$unit=="%",df$number<-df$number-2)

a=ifelse(df$unit=="%",df$number-2,non)

b=a-2

c=paste(a,b,sep="")

but the following error was the result:

the condition has length > 1 and only the first element will be used

could you please help me with it?