I have a question about the restructuring of a dataframe in R in order to boxplot it
My dataframe which looks like this:
data.status data.log
extant 11.10
extant 10.86
extinct 12.04
historical 10.24
extant 10.77
introduction 13.84
extinct 12.09
My goal is to restucture the dataframe so it looks like this:
extant extinct historical introduction
11.10 12.04 10.24 343.23
10.86 12.09
10.77
I think I need to change it to wide-format data, but for some reason it doesn't work with the dcast function
EDIT: I found a quick solution: with split(data$log10, data$status) it is possible to make the dataframe 3-dimensional and re-arrange the list