# NOT RUN {
library(hipread)
data <- hipread_long_yield(
hipread_example("test-basic.dat"),
list(
H = hip_fwf_positions(
c(1, 2, 5, 8),
c(1, 4, 7, 10),
c("rt", "hhnum", "hh_char", "hh_dbl"),
c("c", "i", "c", "d")
),
P = hip_fwf_widths(
c(1, 3, 1, 3, 1),
c("rt", "hhnum", "pernum", "per_dbl", "per_mix"),
c("c", "i", "i", "d", "c")
)
),
hip_rt(1, 1)
)
# Read the first 4 rows
data$yield(4)
# Read the next 2 rows
data$yield(2)
# Reset and then read the first 4 rows again
data$reset()
data$yield(4)
# }
Run the code above in your browser using DataLab