Alessandro Puglisi
2023-Nov-03 16:20 UTC
[R] Adding columns to a tibble based on a value in a different tibble
Hi everyone, I have a tibble with various ids and associated information. I need to add a new column to this tibble that retrieves a specific 'y' value from a different tibble that has some of the mentioned ids in the first column and a 'y' value in the second one. If the id, and so the 'y' value is found, it will be included; otherwise, 'NA' will be used. Could you please help me? Thanks, Alessandro [[alternative HTML version deleted]]
Bert Gunter
2023-Nov-04 14:35 UTC
[R] Adding columns to a tibble based on a value in a different tibble
I think a simple reproducible example ("reprex") may be necessary for you to get a useful reply. Questions with vague specifications such as yours often result in going round and round with attempts to clarify what you mean without a satisfactory answer. Clarification at the outset with a reprex may save you and others a lot of frustration. Cheers, Bert On Sat, Nov 4, 2023 at 1:41?AM Alessandro Puglisi < alessandro.puglisi at gmail.com> wrote:> Hi everyone, > > I have a tibble with various ids and associated information. > > I need to add a new column to this tibble that retrieves a specific 'y' > value from a different tibble that has some of the mentioned ids in the > first column and a 'y' value in the second one. If the id, and so the 'y' > value is found, it will be included; otherwise, 'NA' will be used. > > Could you please help me? > > Thanks, > Alessandro > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >[[alternative HTML version deleted]]
Reasonably Related Threads
- Adding columns to a tibble based on a value in a different tibble
- transform a list of arrays to tibble
- Tidyverse/dplyr solution for filling values of a tibble/dataframe from a column with a nested list.
- Problems installing tibble (ggplot2) in R running Ubuntu 14.04
- Problems installing tibble (ggplot2) in R running Ubuntu 14.04