How to perform boxcox transformation on data in R tool [duplicate]

I want to perform box cox transformation on data using R tool .If anybody can help me with examples or commands to show how it is done in R tool. Thank you in advance.

My main problem is I want to take log of data but if data entries contain 0 then log 0 becomes infinite .To handle this situation I am searching for the past 3 days .I found one solution to use boxcox transformation..but again it is giving this error.

-

marked as duplicate by Andy W, gung, chl♦Jan 9 '13 at 13:25

As stated, this question asks no more than a pointer to the on-line help for boxcox. If you provide more details (available data, research question, reason to apply a Box-Cox transformation), it might be of interest to the statistical community. Otherwise, it will be closed as off-topic (see our FAQ for more information). –  chl Jan 9 '13 at 10:33
Have a look at the boxcox function (documentation here).