Hi All,
I am trying to make first column as a row name but it shows error, could anyone please help with this?
> head(targets, 10) [,1:5]
# A tibble: 10 × 5
Sample_ID Sentrix_ID Sentrix_Position Barcode Batch
<chr> <chr> <chr> <chr> <chr>
1 DC103 202915600062 R07C01 202915600062_R07C01 Batch 13
2 DC115 202915600134 R02C01 202915600134_R02C01 Batch 15
3 DC118 202995640096 R04C01 202995640096_R04C01 Batch 7
4 DC122 202915600016 R06C01 202915600016_R06C01 Batch 18
5 DC124 202915600134 R05C01 202915600134_R05C01 Batch 15
6 DC126 202915590071 R05C01 202915590071_R05C01 Batch 14
7 DC127 202915590071 R02C01 202915590071_R02C01 Batch 14
8 DC131 202995640096 R08C01 202995640096_R08C01 Batch 7
9 DC133 202915600085 R02C01 202915600085_R02C01 Batch 14
10 DC139 200848860168 R02C01 200848860168_R02C01 Batch 5
> names(targets)[1] <- ""
> # first column as row names
> targets2<-targets[,-1]
> rownames(targets2)<-targets[,1]
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
In addition: Warning message:
Setting row names on a tibble is deprecated.
Many thanks,