(list) object cannot be coerced to type 'double'

I've looked around and some suggest that it could be the way data have been imported. For my case, I don't think it is such. Rather I think it has to be the way I define x1 and in1. x1 is an object in which the values are written to which in turn serve as input.