Hi! Welcome to the RStudio Community.
If all you're dealing with is converting "k" to "000" in a character vector (or data frame variable) you can do that pretty easily:
x <- c("997", "998", "999", "1k")
as.numeric(gsub("k", "000", x))
[1] 997 998 999 1000