Error: NMF::nmf - Input matrix x contains at least one null or NA-filled row.
The data frame I use was converted into a data frame from a dtm. I have checked other reported issues and incorporated the following code to check that both no all-zero and all-na rows and columns exist in my data:
# Remove rows with all 0 values
df.tdm.nmf.no.0 <- df.tdm.sparse[rowSums(df.tdm.sparse[, -1]) > 0, ]
# Remove rows with all NA values
df.tdm.nmf.no.na <- df.tdm.nmf.no.0[rowSums(is.na(df.tdm.nmf.no.0))==0,]
df.tdm.nmf <- df.tdm.nmf.no.na
# Remove columns with 0 or missing values
i.0 <- which(colSums(df.tdm.nmf) == 0)
i.na <- which(colSums(is.na(df.tdm.nmf)) > 0)
Unfortunately this does not resolve the issue and I keep getting the error when running:
Hi all,
I am experiencing the following error:
Error: NMF::nmf - Input matrix x contains at least one null or NA-filled row.
The data frame I use was converted into a data frame from a dtm. I have checked other reported issues and incorporated the following code to check that both no all-zero and all-na rows and columns exist in my data:
Unfortunately this does not resolve the issue and I keep getting the error when running:
Does anyone have any ideas on how to solve the issue? Would be much appreciated, thanks!
Please let me know if more info is required to answer this question.