Q R, how can I overwrite the first values of a long vector with values obtained from a file where the file contains possibly fewer values?
Example:
vec1 <- runif(100)
vec2 <- scan("myfile", sep="\n")
I could go through vec2and copy the values into vec1, but I think there should be a more efficient way?
Frank source
share