[R] Removing "row.names"

Yves Gauvreau cyg at sympatico.ca
Wed Feb 7 13:32:13 CET 2001


Try this

sampled <- data.frame(sample(rnorm(100),2))
colnames(sampled) <- " " # Or preferably something meaningful
sampled

1 1.777068
2 0.937161

Yves Gauvreau
B.E.F.P. Universite du Quebec a Montreal
cyg at sympatico.ca

> -----Message d'origine-----
> De : owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]De la part de Dermot MacSweeney
> Envoye : Wednesday, February 07, 2001 6:05 AM
> A : r-help at stat.math.ethz.ch
> Objet : Re: [R] Removing "row.names"
>
>
> If a data.frame formed as follows:
>
> sampled <- data.frame(sample(rnorm(100),2))
>
> sampled
>
> The output is:
>
>   sample.rnorm.100...2.
> 1            -0.1124964
> 2            -1.4590381
>
> What I would like to have is no column titles so I get this:
>
> 1            -0.1124964
> 2            -1.4590381
>
> I don't have a lot of experience with R, so excuse me if this is a stupid
> question.
>
> Best Regards,
> Dermot MacSweeney.
>
>
> **************************************************************
>
> Dermot MacSweeney			NMRC,
> Email: dsweeney at nmrc.ucc.ie		Lee Maltings,
> Tel: +353 21 4904178			Prospect Row,
> Fax: +353 21 4270271			Cork,
> WWW: http://nmrc.ucc.ie			Ireland
>
> **************************************************************
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-
> r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list