About this question
When I run the following code in R then I am not getting any error, but if I run the same code in R shiny, then I am getting the following error:
error 'list' "object cannot be coerced to type 'double' "
In the code, the f2 is the file that is being uploaded by the user, and that file contains only 1 column and multiple rows with 1 word each.
s = vector("list", 1)#the loop below runs over the length of no of genes all written in different rows
for (i in 1:length(f2[,1])) { s[i] = list({ y = lapply(1:6, function(x) apc[[x]]$Log₂ fold change[apc[[x]]$Name== f2[i,1]] ) unlist(as.numeric(y))
}) }