Error in `row.names<-.data.frame`(`*tmp*`, value = value) : invalid 'row.names' length

2.9k views Asked by At

I get the following error: Error in row.names<-.data.frame(*tmp*, value = value) : invalid 'row.names' length

Here is my script

library("RColorBrewer")
library("picante")
library("vegan")
library("ggplot2")

# read OTU data file for BB cultures
read.csv(file = "Heatmap_BB.csv", row.names = 1, header=TRUE, sep=",") -> BB

##creating the data tables for the heatmap.

BBnames <- BB[2:3] #here I assing the lables to be used later in one vector
hmBB <- BB[, 4:ncol(BB)] 

hmBBmatrix <- (BB[,4:ncol(BB)])
hmBBmatrix
rownames(hmBBmatrix) <- BBnames

Can anyone help?

0

There are 0 answers