You can read the file into a data frame and then use the $ operator to define vectors that contain the values in the data frame columns. Try something like
DF <- read.csv("MyFile.txt", sep = " ") # I guess the data separator is a space.
rep <- DF$rep
trt <- DF$trt
y <- DF$y
However, do you really need to use vectors instead of leaving the data in the data frame?