I have a R dataFrame df with the following:
time value reference
45 10 11
22 12 10
13 15 5
I would like to replace the last column of the dataFrame to obtain:
time value space
45 10 11
22 12 10
13 15 5
I tried this:
colnames(length(colnames(df)))<-"space"
but it does not work. How can I do it?