我正在尝试将数据从长格式转换为宽格式,但是我使用的原始值是1和0,并且我的新值列正在生成
data= read.csv("C:/Users/jessi/Documents/Voicelab/2020-2021/modified_d_f.csv")
head(data)
as.numeric(data$preferred_attractive_stim)
widedata<-pivot_wider(
data,
names_from = prepost,
names_prefix = "rating-",
names_repair = "check_unique",
values_from = preferred_attractive_stim,
)
print(widedata)
Values are not uniquely identified; output will contain list-cols.
* Use `values_fn = list` to suppress this warning.
* Use `values_fn = length` to identify where the duplicates arise
* Use `values_fn = {summary_fun}` to summarise duplicates