[R] How to allow duplicate names in R

Yogesh Gupta n@b|yoge@h @end|ng |rom gm@||@com
Sun Jun 23 19:32:59 CEST 2019


Hi,

I do have duplicates names in tab delimited files, I need to allow to read
these duplicate names in R,

Could you please suggest how can modify this code to allow to read
duplicates names:

x<-read.table("HEATMAP.ROOT.input.txt",sep="\t",head=T, check.names=FALSE)

> x

                    Genus     Root_T1     Root_T2     Root_T3

1                 GOUTA19 0.011798697 0.004254994 0.008371628

2                 GOUTA19 0.010871359 0.025930026 0.012268479

3            Planctomyces 0.046654187 0.030925497 0.021187820

4            Methylomonas 0.012051952 0.019538770 0.035813232

5          Propionivibrio 0.104477461 0.286847806 0.184285575



I need to make Genus name as row names but it shows error:


x<-read.table("HEATMAP.ROOT.input.txt",sep="\t",head=T, check.names=FALSE,
row.names=1)

*Error in read.table("HEATMAP.ROOT.input.txt", sep = "\t", head = T,
check.names = FALSE,  : *

*  duplicate 'row.names' are not allowed*


*Kind Regards*

*Yogesh*

	[[alternative HTML version deleted]]



More information about the R-help mailing list