【发布时间】:2021-09-26 12:43:07
【问题描述】:
我想将x 与y 交叉制表以在表格单元格中获得z 的值。
library(tidyverse)
df <- tibble(x = c("a", "a", "b", "b"),
y = c("c", "d", "c", "d"),
z = c("e", "g", "f", "h"))
# I want to obtain this result:
# c d
# a e g
# b f h
Created on 2021-07-18 by the reprex package (v2.0.0)
【问题讨论】: