중첩 된 표를 LaTeX 형식 (Blog Link)으로 가져 오는 중이 블로그를 찾았습니다. 나는 결과를 좋아하지만, 처음에 rownames 다음에 객체에 열을 삽입하려고합니다. 필자는 데이터 프레임을 다루는 데 익숙해 짐으로써이 짐승을 다루는 것이 일반적인 열 인덱싱보다 어렵습니다.표 객체에 열 삽입
pre post
approach mean sd mean sd
1 24.17 8.310 54.33 11.01
2 25.50 9.434 65.25 16.32
3 26.33 9.139 63.17 12.53
을 그리고 여기 내가 모양을하고 싶은 내용은 다음과 같습니다 : 또한 N의 내가 좋겠의 열 여기
pre post
approach n mean sd mean sd
1 12 24.17 8.310 54.33 11.01
2 12 25.50 9.434 65.25 16.32
3 12 26.33 9.139 63.17 12.53
Z의 dput 그리고 여기
내가 지금 가지고있는 무엇 삽입하는 것을 좋아합니다.미리 감사드립니다.
z <- structure(list(24.1666666666667, 25.5, 26.3333333333333, 8.31027111835746,
9.4339811320566, 9.13866245766587, 54.3333333333333, 65.25,
63.1666666666667, 11.0068848977136, 16.3157759685081, 12.5323822978956), .Dim = 3:4, .Dimnames = list(
NULL, c("term", "term", "term", "term")), rowLabels = structure(c("1",
"2", "3"), .Dim = c(3L, 1L), .Dimnames = list(NULL, "approach"), justification = structure(c(NA_character_,
NA_character_, NA_character_), .Dim = c(3L, 1L)), colnamejust = NA_character_, justify = NA, suppress = 0), colLabels = structure(c("pre",
"mean", NA, "sd", "post", "mean", NA, "sd"), .Dim = c(2L, 4L), justification = structure(c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_), .Dim = c(2L, 4L)), colnamejust = character(0), justify = NA, suppress = 0), table = value *
v * approach ~ variable2 * result_variable, formats = structure(c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), .Dim = 3:4, .Dimnames = list(
NULL, c("format", "format", "format", "format"))), justification = structure(c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), .Dim = 3:4, .Dimnames = list(
NULL, c("justification", "justification", "justification",
"justification"))), class = "tabular")
structure(c(12L, 12L, 12L), .Names = c("1", "2", "3"))
나는 미래의 필요를 위해 실제로이 구조를 이해하고 싶습니다. –
게시 한 '구조'를 사용해 보셨습니까? 그것은 당신에게 보여주는 data.frame을 제공합니다. –