# NOT RUN {
# Creating a pibble from scratch
pd <- pibble(
i = c(1, 1, 1, 2, 2, 2),
t = c(1, 2, 3, 1, 2, 2),
x = rnorm(6),
.i = i,
.t = t
)
is_pibble(pd)
# I set .d=0 here to indicate that I don't care how large the gap between one period and the next is
# If I want to use 'seconds' for t.
# See time_variable() to turn unruly variables into well-behaved integers, as well
pd2 <- pibble(
i = c(1, 1, 1, 2, 2, 2),
seconds = c(123, 456, 789, 103, 234, 238),
.i = i,
.t = seconds,
.d = 0
)
is_pibble(pd2)
# }
Run the code above in your browser using DataLab