I have 3 replicates data outputs in separate three .csv files.E

Each files the first column is Gene identification numbers (AGI: my experimental targets). The three files consisted of different experimental outcomes. i.e. first file 250 targets, second ~500, and third ~ 2000.

Each file consisted with other information for the identified targets, e.g.

<a href="https://ibb.co/hsErny"><img src="https://preview.ibb.co/bT9P7y/Capture.png" alt="Capture" border="0"></a><br />

I want to identify common targets (AGIs) in these three .csv files and make a new working table combining other details of the common AGIs.

How can I identify the common targets (AGIs) using R programming?



Using ***tidyverse***, try this example

    # dummy data
    rep1 <- data.frame(AGI = c(1:5,6), value = 1)
    rep2 <- data.frame(AGI = c(2:5,6), value = 2)
    rep3 <- data.frame(AGI = c(1,5,6), value = 3)
    
    library(tidyverse)
    
    bind_rows(list(rep1, rep2, rep3), .id = "Rep") %>% 
      spread(key = "Rep", value = "value", sep = "") %>%
      filter(complete.cases(.)) %>% 
      mutate(AverageValue = rowMeans(.[, -1]))
    
    #   AGI Rep1 Rep2 Rep3 AverageValue
    # 1   5    1    2    3            2
    # 2   6    1    2    3            2  
 
---------
**Tip:** We could create the list of dataframes automatically, something like:

    myReps <- lapply(list.files(), read.csv)

Then carry one with code as above:

    bind_rows(myReps, .id = "Rep") %>% 
    ...etc