[R] Re move row.names column in dataframe

PIKAL Petr petr.pikal at precheza.cz
Thu Mar 14 17:28:35 CET 2013


Hi

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of jeharmse
> Sent: Monday, March 11, 2013 5:28 PM
> To: r-help at r-project.org
> Subject: Re: [R] Re move row.names column in dataframe
> 
> > 1.            If your data frame is numeric, change it to matrix.
> It isn't necessarily numeric.
> 
> > 2.            Or make your own function
> I think that's the solution, but the function has to handle both NA and
> non-numeric.
> 
> equal.NA <- function(x,y)
> all(is.na(x)==is.na(y)) && all(is.na(x) | x==y)
> 
> I'm still worried that row names could bite me in some other way, and
> would prefer to be able to discard them.

As you did not include my answer I can not be 100% sure but for comparison purpose matrix way behaves correctly 

Regards
Petr

> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Remove-row-
> names-column-in-dataframe-tp856647p4660956.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list