I'm not sure what you mean by attaching. Do you mean merging? Do you have two data.frames with weights on one and responses on another? It would be very helpful to give more information and provide a reproducible example.
See FAQ: What's a reproducible example (`reprex`) and how do I create one? and FAQ: How to do a minimal reproducible example ( reprex ) for beginners