as.data.frame row.names is a vector or NULL not a logical value