Hello,
I am using "moanin" package for my time-series data analysis. When I load and run the data object (varoquaux2019leaf) the whole pipeline runs just fine. However, when I load my own data (data and metadata), it gives me the following error at creating the moanin object stage:
My code:
moaninObject <- create_moanin_model(data=preData, meta=preMeta, group_variable="Condition", time_variable="Week")
Error:
Error in colData(data)[, group_variable_name]:as.factor(colData(data)[, : NA/NaN argument
In addition: Warning messages:
1: In colData(data)[, group_variable_name]:as.factor(colData(data)[, : numerical expression has 97 elements: only the first used
2: In colData(data)[, group_variable_name]:as.factor(colData(data)[, : numerical expression has 97 elements: only the first used
3: In make.names(colData(data)[, group_variable_name]:as.factor(colData(data)[, : NAs introduced by coercion
Now what I did to check, I wrote .txt file from "varoquaux2019leaf" data and saved it on my computer as below:
data(varoquaux2019leaf)
write.table(varoquaux2019leaf$data, "preData.txt")
write.table(varoquaux2019leaf$meta, "preMeta.txt")
Then loaded the same data as below:
preMeta <- read.table("preMeta.txt")
preData <- read.table("preData.txt")
But still, I get the same error as above. I also tried saving it in .csv format but again get error while creating the monain object. I was wondering whats the reason that if I load the data directly from their object (varoquaux2019leaf) it works, but with my own data it gives an error? Could it be due to file format (.txt/csv)?
Please help me in solving this issue.