# Appropriate rownames error (new error with version update)

**URL:** <https://forum.biobakery.org/t/appropriate-rownames-error-new-error-with-version-update/5530>\
**Category:** MaAsLin\
**Created:** [June 24, 2023, 7:16pm UTC](https://forum.biobakery.org/t/appropriate-rownames-error-new-error-with-version-update/5530 "2023-06-24T19:16:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Alix\_Matthews](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/alix_matthews/32/2242_2.png) [@Alix\_Matthews](https://forum.biobakery.org/u/Alix_Matthews)\
**Post date:** [June 25, 2023, 5:19pm UTC](https://forum.biobakery.org/t/appropriate-rownames-error-new-error-with-version-update/5530/3 "2023-06-25T17:19:36Z")

</div>

Hi Jacob -

Thanks for your quick reply!

Both the metadata object and the taxonomic abundance table are read in as a data.frame (I added a few more columns from my actual metadata file for reproducibility and attached here).

[metadata\_subset.csv](https://forum.biobakery.org/uploads/short-url/yIYECb9yISkWfPUDeG4y2qtsjBK.csv) (1.1 KB)

Also, the rowNames of both of these data.frames match up. I also tried putting the row.names in the exact same order within both data.frames, but that made no difference (order of the sample.id’s didn’t matter in the previous version I used, but I wanted to double check).

* * *

Previously, I had no issues with this first way of importing my data using v. 1.10.1… now Maaslin does not run with this way of importing data and throws this error.

`Error in Maaslin2(input_data = df, input_metadata = metadata, output = "fit_data_cplm_none_category", : If supplying input_data as a data frame, it must have appropriate rownames!`

```auto
# 1. Load metadata ####
> metadata <- read.csv(file = "metadata_subset.csv", sep = ",", header= TRUE)

> str(metadata)
'data.frame':	48 obs. of 4 variables:
 $ sample.id : chr "PM01" "PF01" "PM02" "PF02" ...
 $ category_broad: chr "mites" "feather" "mites" "feather" ...
 $ bird_sex : chr "Male" "Male" "Male" "Male" ...
 $ bird_age : chr "ASY" "ASY" "ASY" "ASY" ...

> # 2. Load Data ####

> df <- read.csv(file = "OTU_FUNguild_subset.csv", sep = ",", header= TRUE)

> str(df)
'data.frame':	48 obs. of 46 variables:
 $ SampleID : chr "PF01" "PF02" "PF04" "PF05" ...
 $ X6e5c88724ce4ad5457ab9e3e47170818: num NA 0 0 0 0 NA NA 0 NA NA ...
 $ X2a57bb2d180f703fc42c5c6a09daeb2c: num NA 0 0 0 0 NA NA 0 NA NA ...
 $ a91aab690b10d15fa4bb3f92f4bcb1bb : num NA 0 0 0 0 NA NA 0 NA NA ...
[[truncated]]

```

* * *

But then with this way from the tutorial (I’m not sure if this import step was updated since v. 1.10.1), if I load with `row.names = 1, stringsAsFactors = FALSE`… it starts to run… but then gets stuck on this error:

`Error in `rownames\<-`(x, value) : attempt to set 'rownames' on an object with no dimensions`

```auto
> # 1. Load metadata ####
> metadata <- read.csv(file = "metadata_subset.csv", sep = ",", header= TRUE, row.names = 1, stringsAsFactors = FALSE)

> str(metadata)
'data.frame':	48 obs. of 3 variables:
 $ category_broad: chr "mites" "feather" "mites" "feather" ...
 $ bird_sex : chr "Male" "Male" "Male" "Male" ...
 $ bird_age : chr "ASY" "ASY" "ASY" "ASY" ...

> # 2. Load Data ####
> df <- read.csv(file = "OTU_FUNguild_subset.csv", sep = ",", header= TRUE, row.names = 1, stringsAsFactors = FALSE)

> str(df)
'data.frame':	48 obs. of 45 variables:
 $ X6e5c88724ce4ad5457ab9e3e47170818: num NA 0 0 0 0 NA NA 0 NA NA ...
 $ X2a57bb2d180f703fc42c5c6a09daeb2c: num NA 0 0 0 0 NA NA 0 NA NA ...
 $ a91aab690b10d15fa4bb3f92f4bcb1bb : num NA 0 0 0 0 NA NA 0 NA NA ...
[[truncated]]

```

Any other ideas of what the issue could be? Thank you again!

---

_[View the full topic](https://forum.biobakery.org/t/appropriate-rownames-error-new-error-with-version-update/5530)._
