Linking CRSP and Compustat in R

A good introduction to seeking help from coding forums is to pose your questions as a [reproducible example (what many folks call a reprex for short)](FAQ: What's a reproducible example (`reprex`) and how do I do one?, the reprex-r-package is a handy tool to help make this easy).

With a question like this, you might provide samples (small samples) of the two tables you'd like to merge, and a copy of the merged data you'd like to get. (Here's a discussion of how you can take data from your R console and offer it in a reprex-friendly format for coding forums like this, I prefer dput)

In terms of tools for merging two datasets, I personally like the tidyverse's dplyr's two-table verbs for stuff like this.. But I'd be worried about suggesting this until we more clearly understand your desired outcome - since the time series model you want to apply later may require your data is structured in a particular way.