Re: [R] using if else function to complete a column in data frame

2017-01-08 Thread David Winsemius
> On Jan 8, 2017, at 9:21 PM, Cacique Samurai wrote: > > Hello all! > > I´m trying to complete the "movimento" column in dataframe based in > the values of "kmr" column in two sequential lines, as below: > > data example (dput in the end of email): > > IDkmr movimento > 510.70

Re: [R] using if else function to complete a column in data frame

2017-01-08 Thread PIKAL Petr
est.s) test but assigned in this case is not factor but numeric vector, which seems to me strange. Maybe somebody could explain this behaviour Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Cacique > Samurai > Sent: Monday, Ja

[R] using if else function to complete a column in data frame

2017-01-08 Thread Cacique Samurai
Hello all! I´m trying to complete the "movimento" column in dataframe based in the values of "kmr" column in two sequential lines, as below: data example (dput in the end of email): IDkmr movimento 510.700 314.20NA 110.700 278.74NA 210.700 278.74N