<- data.frame(abc = 1:2,
df xyz = c("a", "b"))
# list method
$x
df2]]
df[["xyz"]
df[c("abc", "xyz")]
df[# matrix method
2]
df[, "xyz"]
df[, c("abc", "xyz")] df[,
Lab 08: Tibbles and Pipes
Note
In lab.qmd ## Lab 8
section,
- Compare and contrast the following operations on a
data.frame
and equivalenttibble
. What are the differences?
<- tibble(abc = 1:2,
tib xyz = c("a", "b"))
# list method
$x
tib2]]
tib[["xyz"]
tib[c("abc", "xyz")]
tib[# matrix method
2]
tib[, "xyz"]
tib[, c("abc", "xyz")] tib[,
- Use
|>
to first select last 12 rows ofiris
data set usingtail()
, then provides summary statistics on its columns usingsummary()
.