Hi I have a sample dataset like this. What I would like to do is to calculate the sum of column "Number" and append it to the last row. I understand that I can use the package "Janitor" to provide the ideal result but my work device does not have the updated version of R. So I am trying to figure a way to do the same thing.
#using janitor library
df = df%>%
adorn_totals("row")
Another way of solving it would be to calculate the sum of column using
x = sum(df$Number)
but I have no idea how to append x into df