You can work with the "Hmisc" package, which helps you to impute columns.
Let's take this data-frame:
DF <- data.frame(cost = c(10, 20, NA, 40), fruit = c('apple','guava','banana','orange'))
Imputing with mean value:
with(DF, impute(cost, mean))
Imputing with median value:
with(DF, impute(cost, median))
Imputing with random value:
with(DF, impute(cost, 'random'))
Imputing with minimum value:
with(DF, impute(cost, min))
Imputing with maximum value:
with(DF, impute(cost, max))