I have this dataframe and I would like to calculate the %
for each row (for example). I would like to transform this dataframe in the same dataframe but only for %
.
Just like this image:
How Can I do it?
Data:
dat <- data.frame(
county = c("FRANCIA", "GRECIA", "ITALIA"),
`310` = c(73, 165, 347),
`320` = c(13, 80, 118),
`330` = c(10, 57, 94),
`340` = c(28, 116, 177),
check.names = FALSE
)