I imported data from a .csv file, and attached the dataset.
My problem: one variable is in integer form and has 295 levels. I need to use this variable to create others
Working from your clarification I suggest you redo your read statement with read.table and header=TRUE, stringAsFactors=FALSE and as.is = !stringsAsFactors and sep=",":
datinp <- read.table("Rdata.csv", header=TRUE, stringAsFactors=FALSE ,
as.is = !stringsAsFactors , sep=",")
datinp$a <- as.numeric(datinp$a)
datinp$b <- as.numeric(datinp$b)
datinp$ctr <- with(datinp, as.integer(a/b) ) # no loop needed when using vector arithmetic