Here is one way
tmydf = setNames(data.frame(t(mydf[,-1])), mydf[,1])
More Related Contents:
- How to transpose a dataframe in tidyverse?
- Deleting specific rows with a pattern[start and end indicators] from a dataframe [closed]
- Replace values in a dataframe based on lookup table
- Create a sequential number (counter) for rows within each group of a dataframe [duplicate]
- Sample random rows in dataframe
- Extracting specific columns from a data frame
- Find indices of duplicated rows [duplicate]
- Subset / filter rows in a data frame based on a condition in a column
- Replacing character values with NA in a data frame
- Coerce multiple columns to factors at once
- Reshape multiple values at once
- Delete rows that exist in another data frame? [duplicate]
- Cumulatively paste (concatenate) values grouped by another variable
- How to move cells with a value row-wise to the left in a dataframe [duplicate]
- combining two data frames of different lengths [closed]
- Match values in data frame with values in another data frame and replace former with a corresponding pattern from the other data frame
- Converting nested list to dataframe
- Find which interval row in a data frame that each element of a vector belongs in
- Comparing two vectors in an if statement
- Splitting a large data frame into smaller segments
- How to add a factor column to dataframe based on a conditional statement from another column?
- Filter data frame rows based on values in vector
- Should I use a data.frame or a matrix?
- Replace empty values with value from other column in a dataframe
- Split dataframe using two columns of data and apply common transformation on list of resulting dataframes
- Identify records in data frame A not contained in data frame B [closed]
- Replace value with the name of its respective column
- Difference between `names(df[1])
- How to create a new variable in a data.frame based on a condition?
- Interpolating timeseries