Hi Mary,
To print without [1,] use cat() instead of print(). To get rid of the
row names when printing a data.frame use:
print(data.frame, row.names = FALSE)
To get nice Latex tables, you can use xtable (as the other reply
suggested). If you want to include it in Word, you can export your data
using write.table and read it into Excel to make a table for Word.
cheers,
Paul
Mary A. Marion wrote:
Hello,
I have been watching my output as I create functions and do other
things in r.
One thing I don't like is the [1,] type notation at the beginning of a
line. I have been
able to change that to a number such as 1 2 etc. using
as.data.frame(object).
How can I stop the printing of a line number and column heading if I
want to?
I am thinking about publishing and writing of papers. It is much
easier to not have to
remove that leading line number when inserting output into papers.
Thank you.
Sincerely,
mmstat
______________________________________________
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.
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul
______________________________________________
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.