[RkWard-devel] Good way to delete a row from a data.frame?

Pierre ECOCHARD p-eco at rocketmail.com
Thu Sep 2 12:19:45 UTC 2004


 --- Thomas Friedrichsmeier
<thomas.friedrichsmeier at ruhr-uni-bochum.de> a écrit : 
> > You could try:
> > my.data <- my.data[-20]
> 
> Neat. I did not know about this possibility.
> Unfortunately, it still removes 
> the attributes (at least for me):
> 
> my.data <- data.frame (a=c (1:10), b=c (11:20))
> attr (my.data$a, "test") <- "attribute exists"
> attr (my.data$a, "test")  # "attribute exists"
> 
> my.data <- my.data[-10,]
> attr (my.data$a, "test") # NULL
> 
> Does the attribute "survive" for you?


Same thing here :/ 
It only saves name attributes. There doesn't seem to
exist any simple way to save all the attributes of an
object... I'm not sure if this really is a feature. 

Sorry, no idea so far... I guess this is a case for
the R mailing list.



	

	
		
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com




More information about the Rkward-devel mailing list