Are you replacing with another 1998 R1 swingarm? You might need to change out the bearings if the bearings have lots of miles on the new arm and cracks or deteorate of the hard plastics material (little debris in where the bearings are). You will need to remove the chain from the old swingarm, but if you are replacing the chain also, you do not need to. Hopefully, you can get the chain of off the front sprocket.
I fitted a 2002/2003 swingarm to my 2001 R1, Fit perfectly. I also use these items from the 2002/2003 R1; rear brake & lines, brake mounting bracket, rear wheels, spacers, rear cush drive, and rear axle & nut. You don’t have too use the rear wheels, spacers, rear cush drive, and rear axle & nut. You can still make the 98-01 wheel fit to the 2002/2003 swingarm but with a new spaceron the brake bracket side. Reason is the 2002/2003 swingarm is a tiny bit wider.
PM me if you need something to be answer.