Assuming that your table is called df
and the columns of your table are named X1
, X2
, X3
try the following:
library(dplyr)
library(tidyr)
df %>%
spread(X2, X3)
1
solved Conditional columns to row [duplicate]
Assuming that your table is called df
and the columns of your table are named X1
, X2
, X3
try the following:
library(dplyr)
library(tidyr)
df %>%
spread(X2, X3)
1
solved Conditional columns to row [duplicate]