On Fri, 13 Oct 2006, jim holtman wrote: > Take a look with 'dput' and you will see the difference: > >> row.names(x) <- 1:n >> dput(x) > structure(list(V1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), V2 = c(11, > 12, 13, 14, 15, 16, 17, 18, 19, 20)), .Names = c("V1", "V2"), row.names = > c(NA, > 10), class = "data.frame") >> row.names(x) <- 2:(n+1) >> dput(x) > structure(list(V1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), V2 = c(11, > 12, 13, 14, 15, 16, 17, 18, 19, 20)), .Names = c("V1", "V2"), row.names = c(2, > 3, 4, 5, 6, 7, 8, 9, 10, 11), class = "data.frame") >> > > 'row.names' is different.
Unfortunately, dput() does not give an accurate representation of these objects: see the warnings on its help page. That is why I mention dump() not dput() in my reply. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@stat.math.ethz.ch 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.