Seems a fair case for
df/rowSums(df)
# A B C
# A 0.9000000 0.1000000 0.0000000
# B 0.3333333 0.3333333 0.3333333
# C 0.3333333 0.3333333 0.3333333
If you don't want so many digits after the dot set options(digits = 2)
or use print(df/rowSums(df), digits = 2)
or use round
round(df/rowSums(df), 2)
# A B C
# A 0.90 0.10 0.00
# B 0.33 0.33 0.33
# C 0.33 0.33 0.33
Or as suggested by @akrun
round(prop.table(as.matrix(df1),1),2)