1. Math
  2. Statistics And Probability
  3. using r generate the code to convert the following data...

Question: using r generate the code to convert the following data...

Question details

Using R, generate the code to convert the following data frame to wide format.

1 AF 2 A M 3 BF 4 B M grp Sex neanl sd meanK sdlh 0.34 0.08 0.57 0.33 0.40 0.07 0.65 0.27 0.22 0.11 0.47 0.33 0.33 0.11 0.55 0.31 The result should look like the following display. grp F.meanL F.meanR F.sdL F.sdR M.meanL M.meanR M.sdL M.sdR 0.33 0.27 0.22 0.33 0.34 0.11 0.08 0.400.11 0.07 0.47 0.55 0.57 0.65 0.33 0.31 Hint: use gather) in conjunction with spread(

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution