How to transform R data from long-ish to wide-ish [duplicate]
问题 This question already has answers here : Convert data from long format to wide format with multiple measure columns (5 answers) Closed 23 days ago . I am using R to try to transform my data frame from "long-ish" to "wide-ish" and I have searched in vain for an answer that uses data similar in structure to mine. Here are my data: | ID | NAME | V1 | V2 | V3 | |------|------|-------|----:|-----:| | 1001 | Bob | Red | 302 | 0.50 | | 1001 | Bob | Blue | 737 | 0.50 | | 1002 | Jim | Red | 432 | 0.14