Sadz A <sadz_a1000 <at> yahoo.co.uk> writes: > > This works fine untill D=0 > because then 'sign' does not give 0 a +ve sign it takes it as 0 and multiplies > decimal by 0 to give 0. > example > D<-0 > decimal<-D+(M/60)+(S/3600) > decimal.degs<-sign(D)*decimal > decimal.degs > 0 > decimal.degs <- ifelse(D==0,1,sign(D))*decimal work?