Error in sum(x) : invalid 'type' (character) of argument - with no character variables

88 Views Asked by At

I am running an archived package in a version-controlled R docker image: rocker/rstudio:3.5.3. I have dataset with my outcome (y), 3 covariates (cov1,..,cov3), an interaction (var_int), and roughly 19,000 single nucleotide polymorphims (snps; rsID#) for just under 2,000 participants.

When I am implementing the data.to.PIGE step, I received the error below:

data <- data.to.PIGE(data = dataframe, data.pathway = data.pathway, list.gene.snp = list.gene.snp, choice.pathway = c(1))
Error in sum(x) : invalid 'type' (character) of argument

I am puzzled for two reasons:

1) I ran sum(is.character(dataframe)) it returned: [1] 0

and I ran type <- lapply(aa_pige_tlr, class) screenshot of a section of the output is attached

2) I chose a random sample of SNPs (n = 992) for the first 1000 participants to use as a smaller test dataset and everything went fine

So I thought maybe I should just reduce the size of my dataset. So I split the master dataset into two pathway groups (n = 12k and n = 7k) but I received the same error as above for both sets.

Any thoughts or suggestions would be greatly appreciated! thanks and apologies if there is a very simple answer (I'm actually hoping there is!)

-Hannah

0

There are 0 best solutions below