On 10/27/2009 10:46 AM, Kenneth Roy Cabrera Torres wrote:
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)]


Please try the following.  After doing the lines above, do

save(x, file="x.RData")

and exit from R.  Then restart R, and run

load("x.RData")
y <- gsub("(^ +)|( +$)","",x)

If it still fails, that's a sign that there's a problem in that vector of values; if not, it's likely some sort of memory problem that will be harder to track down. In the former case you could email me the file and if it also fails here I can probably track it down. If it's a memory problem, I can try, but I'm less optimistic that I'll find it.

Duncan Murdoch



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.

Reply via email to