我就是这样做的,利用伟大的
styler
包裹第一:复制
dput
并使用RStudio中Addins菜单下的“样式选择”选项。这使得:
structure(list(a = 1:5, b = structure(1:5, .Label = c(
"a", "b",
"c", "d", "e"
), class = "factor")), class = "data.frame", row.names = c(
NA,
-5L
))
structure(list(a = 1:5, b = structure(1:5, .Label = c( "a", "b", "c", "d", "e"), class = "factor")), class = "data.frame", row.names = c( NA, -5L))
然后,再次“样式选择”以使空白保持一致:
structure(list(a = 1:5, b = structure(1:5, .Label = c("a", "b", "c", "d", "e"), class = "factor")), class = "data.frame", row.names = c(NA, -5L))
总的来说,如果
dput
输出,但在这一点上,它真的远远不像一个最小的reprex无论如何。