Using reshape
function:
reshape(dat1, idvar = "name", timevar = "numbers", direction = "wide")
More Related Contents:
- Reshaping data.frame from wide to long format
- Reshaping multiple sets of measurement columns (wide format) into single columns (long format)
- Transpose / reshape dataframe without “timevar” from long to wide format
- Reshape multiple value columns to wide format
- How to sum a variable by group
- How do I make a list of data frames?
- Split data frame string column into multiple columns
- How to add leading zeros?
- Order discrete x scale by frequency/value
- Why is `[` better than `subset`?
- Convert continuous numeric values to discrete categories defined by intervals
- Count number of rows per group and add result to original data frame
- Why does summarize or mutate not work with group_by when I load `plyr` after `dplyr`?
- Apply several summary functions on several variables by group in one call
- How to debug “contrasts can be applied only to factors with 2 or more levels” error?
- How to use a variable to specify column name in ggplot
- How can I trim leading and trailing white space?
- Determine path of the executing script
- How to generate permutations or combinations of object in R?
- Numeric comparison difficulty in R
- Remove duplicated rows
- Use of ~ (tilde) in R programming Language
- Combine two or more columns in a dataframe into a new column with a new name
- Conditional merge/replacement in R
- Subset rows in a data frame based on a vector of values
- How to plot a function curve in R
- Index values from a matrix using row, col indices
- Display exact value of a variable in R
- Is there anything wrong with using T & F instead of TRUE & FALSE?
- R: How to split a data frame into training, validation, and test sets?