change the values in duplicate rows

I have created duplicate rows in dataset. Now i want to change some values in duplicate rows with out changing them in original rows.

is this code correct??

if (leve$time == 0) {print(leve2$DV == NA)}

and i also want to change some values in original rows with out changing them in duplicate rows.

Thankyou

If() is not vectorised so will only look at the first value given.
ifelse() is vectorised.
Read about it and see example by
?ifelse
In the console

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.