data_preparation function

Prepare the dataset in the proper format for R2jags