From hpages at fredhutch.org  Wed Nov 22 03:19:59 2017
From: hpages at fredhutch.org (=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=)
Date: Tue, 21 Nov 2017 18:19:59 -0800
Subject: [Rd] `[<-.data.frame` sets rownames incorrectly
Message-ID: <5A14DECF.1080500@fredhutch.org>

Hi,

Here is another problem with data frame subsetting:

   > df <- data.frame(aa=1:3)
   > value <- data.frame(aa=11:12, row.names=c("A", "B"))

   > `[<-`(df, 4:5, , value=value)
     aa
   1  1
   2  2
   3  3
   A 11
   B 12

   > `[<-`(df, 5:4, , value=value)
     aa
   1  1
   2  2
   3  3
   B 12
   A 11

For this last result, the rownames of the 2 last rows should
be swapped.

H.

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] `[<-.data.frame` sets rownames incorrectly
=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=