Dr. Murdoch: I am puzzled! As you adviced me I do this:
x <- as.character(alumnos$AL_NUME_ID) x <- x[-seq_len(length(x)/2)] y <- gsub("(^ +)|( +$)","",x) And it fails, But, trying to locate the problem I do: x <- as.character(alumnos$AL_NUME_ID) x <- x[-seq_len(length(x)/2)] x <- x[seq_len(length(x)/2)] y <- gsub("(^ +)|( +$)","",x) works x <- as.character(alumnos$AL_NUME_ID) x <- x[-seq_len(length(x)/2)] x <- x[-seq_len(length(x)/2)] y <- gsub("(^ +)|( +$)","",x) works Now, both works!!! So, I am puzzle!!! I cannot locate the problem. Thank you for your advice. Kenneth ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.