Is there a way to read parameters from a file in an R script?
I want to create a config file that has
db_host=xxxx
db_name=xxxx
db_user=xxxx
db_pass=
What you describe here is a desire for common configuration across systems, platforms, languages, ...
That is a big topic and much ink has been spilled on this. Some people see XML as the answer, other prefer simpler related formats like JSON. You could also try Apache-style config files as most languages have libraries for it (but R may be an exception).
I happen to like Google ProtocolBuffers which are fast, efficient, cross-platform, multi-language, forward-compatible ... but have the one downside of not being ascii files (though you can read ascii files first and then create proto files). For R, there is the RProtoBuf package.