[R] Changing values (factors) does not change levels of that value?!
Oliver Bandel
oliver at first.in-berlin.de
Sun Nov 16 14:00:05 CET 2008
Hello,
* I read in a server weblog with read.table.
-> OK.
* I look for the downloaded-size-values (filesize of the download)
-> OK
* I found "-" and wanted to substitute them with "0" and
used: weblog$V8[ weblog$V8 == "-" ] <- 0
-> OK
* checked the contents on "-" vs. "0" and found all "-" substituted by
0
-> OK
* when then looking at str(weblog),
the "-" will stay in the levels, mentioned for the variable weblog$V8
-> BAD!
Is this snormal behaviour?
Do I have to throw out the unwanted level by myself?
Ciao,
Oliver
More information about the R-help
mailing list