-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'list' object cannot be coerced to type 'integer' #48
Comments
Hi Error message: R version 4.3.1, FEAST_0.1.0
Does anybody have a solution to this? Best regards, |
Hello all! I have the same issue as both commenter above and can't figure out the reason. I made sure all data is factors or integer and formatted the same way as in the examples. In my ASV file, the column names are the sample name, but I get the same error if I transpose the matrix or add a SampleID column (it's a character string). Thanks for your help! `path="~/stats/FEAST/bac/FEAST_to_sessile" FEAST_output <- FEAST(C = asv, metadata = feast_meta, different_sources_flag = 0)` |
Hello! I am having the exact same problem. Second, if the case is that the columns all need to be intergers... how can we do that when the example data has characters? |
Hopefully I can clarify some of the issues discussed in this thread:
Note that the Load_CountMatrix function transposes the table, which is why the example data is flipped from what is required for the FEAST function to run. (The Load_metadata function does not transpose data). Good luck and please let me know if there is still any confusion. |
A colleague and I had to add a 'SampleID' column to the meta data table to make it work. The column is the name of each samples, which confusingly, also needs to be the row name. We ended up with 4 columns in the metadata files. It doesn't seem to be what is written in the help files, but it worked for us. Let me know if you have any more questions! Here is what my data looks like |
Hey! Thanks for the help everyone! My mistake turns out to have been due to a real rookie move.... My count matrix was a data frame, not a matrix... thank you so much for your help! |
Hello,
sorry for the potentially amateur question.
this is what i have:
str(otus)
'data.frame': 2139 obs. of 175 variables:
$ LF004d: int 0 0 0 0 0 0 0 0 0 0 ...
$ LF004e: int 0 0 0 0 0 0 0 0 0 0 ...
$ LF005c: int 0 0 0 0 0 0 0 0 0 0 ...
$ LF005d: int 0 0 0 0 0 0 0 0 0 0 ...
$ LF005e: int 0 0 0 0 0 0 0 0 0 0 ...
$ LF006a: int 0 0 0 0 0 0 0 0 0 0 ...
[list output truncated]
str(metadata)
'data.frame': 175 obs. of 4 variables:
$ SampleID : chr "LF004d" "LF004e" "LF005c" "LF005d" ...
$ Env : chr "d" "e" "c" "d" ...
$ SourceSink: chr "Source" "Source" "Source" "Source" ...
$ id : chr "NA" "NA" "NA" "NA" ...
metadata$id contains numbers from 1 to 15 (I have 15 different sinks) and NA (for all sources)
i am trying the FEAST function:
FEAST_output <- FEAST(C = otus, metadata = metadata)
this is the error message:
Error in FEAST(C = otus, metadata = metadata2) :
'list' object cannot be coerced to type 'integer'
I am not sure how to proceed. Is the issue with metadata$id? i attempted to make metadata$id numeric by typing:
metadata$id<-as.numeric(metadata$id)
but the same error message results.
thank you so much for your help.
Sincerely,
Melissa
The text was updated successfully, but these errors were encountered: