I created a data frame from a data set with unique marketing sources. Let's say I have 20 unique marketing sources in this new data frame D1. I want to add another column that has the count of times this marketing source was in my original data frame. I'm trying to use the dplyr package but not sure how to reference more than one data frame.
original data has 16000 observations new data frame has 20 observations as there are only 20 unique marketing sources. How to use summarize in dplyr to reference two data frames? My objective is to find the percentage of marketing sources.
My original data frame has two columns: NAME, MARKETING_SOURCE This data frame has 16,000 observations and 20 distinct marketing sources (email, event, sales call, etc) I created a new data frame with only the unique MARKETING_SOURCES and called that data frame D1 In my new data frame, I want to add another column that has the number of times each marketing source appeared in the original data frame. My new Data frame should have two columns: MARKETING_SOURCE, COUNT