Hi all!
I have a tibble regarding a series of comments on a forum; the tibble has a
certain number of variables, and in particular:
id: comment id;
author_id: author id;
parent_id: if the message is a reply, the original comment id
I want to add another column, in which I put the author id of the original
comment, when parent_id IS NOT NA.
I already tried to use mutate + ifelse but my problem is that I have to
refer to an author id in a different row than that in which I'm evaluating
the if condition...
Thanks in advance,
Alessandro
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.