I am new to R programming and I am using the BioMart package to extract gene paralogues for a list of genes. 

Using the 'genes' vector below is it possible to loop each value individually into the values part of the 'getBM' function then add the output of this into a data frame? 

```
genes <- C("FGF1", "BRCA1", "FOXP2")

getBM(attributes = c("external_gene_name", "hsapiens_paralog_associated_gene_name"), 
                                  filters = "external_gene_name", 
                                  values =  , mart = ensembl_hsapiens)

```

Below is how I've been doing it, using the genes vector as the values but it gives me the wrong numbers which I know the reason as to why. When I try the genes individually the values are correct which is why I want to loop these values instead. 

```
 genes <- C("FGF1", "BRCA1", "FOXP2")

getBM(attributes = c("external_gene_name", "hsapiens_paralog_associated_gene_name"), 
                                  filters = "external_gene_name", 
                                  values = c(genes), mart = ensembl_hsapiens)

```