Hey,
I'm trying to replace the first element of the following vector with the number 1: (3,4,5,6,7).
The code I used is
replace (x,x[c(1)],1)
However, for some reason it then decides to replace the third element only, changing my vector into (3,4,1,6,7)
Any ideas what I'm doing wrong?
Thx
edit: I should add that when typing c(3) it replaces the 5th element...