[R] how to print a data.frame without row.names
Romain Francois
francoisromain at free.fr
Tue Aug 2 16:05:19 CEST 2005
Le 02.08.2005 15:45, Heinz Tuechler a écrit :
>Dear All,
>is there a simple way to print a data.frame without its row.names?
>
>example:
>datum <- as.Date(c("2004-01-01", "2004-01-06", "2004-04-12"))
>content <- c('Neujahr', 'Hl 3 K.', 'Ostern')
>df1 <- data.frame(datum, content)
>print(df1)
>
> datum content
>1 2004-01-01 Neujahr
>2 2004-01-06 Hl 3 K.
>3 2004-04-12 Ostern
>
>Can I get this "table" without 1, 2, 3 ?
>
>
See write.table and its row.names argument
R> write.table(df1, row.names=FALSE)
Romain
--
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
~~~~~~ Romain FRANCOIS - http://addictedtor.free.fr ~~~~~~
~~~~ Etudiant ISUP - CS3 - Industrie et Services ~~~~
~~ http://www.isup.cicrp.jussieu.fr/ ~~
~~~~ Stagiaire INRIA Futurs - Equipe SELECT ~~~~
~~~~~~ http://www.inria.fr/recherche/equipes/select.fr.html ~~~~~~
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
More information about the R-help
mailing list