I want to find the best choice of $C$ and $\gamma$ parameters for Radial Basis Function kernel.
I am using kernlab instead of e1071 library. So how can i optimize RBF parameters $C$ and $\gamma$ with ksvm function?
You can use Optunity for that purpose. This is a library of optimization algorithms for automated hyperparameter search.
You can find an example of using Optunity to optimize an SVM in e1707 here, mapping this to kernlab should be straightforward. All you need to do is specify box constraints (a lower and upper bound) on $C$ and $\gamma$ and a budget of function evaluation (i.e., how many ($C$, $\gamma$)-pairs can be tested.