In an input data structure

```
data.frame(stockname = c("google", "amazon"), open= c(30, 40), close = c(32, 48))

```

How is it possible to convert the interger number which is existed in every row with the respectively percentage using as sum the full sum of all rows of the data frame to calculate the percentage.

The total sum of all rows of the input data is 150 so the percentage example output data frame is

```
data.frame(stockname = c("google", "amazon"), open= c(20%, 26.7%), close = c(21.3%, 32%))

```