> a <- data.frame(name=c(rep("a",5), rep("b",5)), year=c(1989:1993, 1989:1993), 
> var=c(1:10))
> str(a)
> b <- pdata.frame(a, index=c("name","year"))
> str(b)
Now, I want to convert b into a data frame and have a structure
similar to a. How do I do that?
-- 
Apoorva Gupta
Consultant
National Institute of Public Finance and Policy

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to