How do write the following piece of code in R? I am trying to write a piece of code for R to fetch data from an api with the following command:

data &lt;- read.csv("https://...../api/dataservice?sql = select * from db where name IN (?)")


The parenthesis are where I need to input 218 different name tags. How can I do this programmatically? It is possible to write down few of them, but over 200 is not possible. Is there a way this? Can I use a character vector containing the names?
If you already have the names in R, you can iterate over the vector of names, and use the paste function. Here's the help page for it. sprintf would be another option, if you prefer that approach.

An example of this would be 

names &lt;- c("a", "b", "c")
querystring_a &lt;- "https://...../api/dataservice?sql = select * from db where name IN "
querystring_b &lt;- '\\'
querystring_c &lt;- "\'"
for(n in names){
    cat(paste(querystring_a, querystring_b, querystring_c, n, querystring_c, sep=""), sep="\n")
}


Return:

https://...../api/dataservice?sql = select * from db where name IN \'a'
https://...../api/dataservice?sql = select * from db where name IN \'b'
https://...../api/dataservice?sql = select * from db where name IN \'c'