You need to *print* results explicitly within a for-loop.
E.g.
print(head(d_dataset[,
c(paste0("v_turnover_",year),
paste0("v_customer_", year))]))
See FAQ 7.16 for a related discussion.
cheers,
Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of
Hi All,
I would like to write a program that iterates over a set of dynamically
generated variables and produces some stats or prints parts of the data.
# --- data
v_turnover_2011 <- c(10, 20, 30, 40 , 50)
v_customer_2011 <- c(0, 1, NA, 0, 1)
v_turnover_2012 <- c(10, 20, 30, 40 , 50)
v_customer_
2 matches
Mail list logo