Philipp Pagel wzw.tum.de> writes:
[...]
>
> foo$bar <- factor(foo$bar)
This was my first attemot, before posting here,
and it somehow did not worked...
...now it works so I maybe was too tired,
when trying it and messed something up. :(
[...]
> > x <- factor(c(0,1,3,4,5,7))
> > x
> [1]
Philipp Pagel wzw.tum.de> writes:
[...]
> As you are reading the data from a file anyway, the simplest
> solution would probably be to use the colClasses argument ot
> read.table in order to get numeric avlues in the first place.
[...]
Hey, I tried this colClasses-option.
It's really fine! :)
C
On Nov 16, 2008, at 9:25 AM, Philipp Pagel wrote:
snip
As you are reading the data from a file anyway, the simplest
solution would probably be to use the colClasses argument ot
read.table in order to get numeric avlues in the first place.
Or use stringsAsFactors = FALSE,
If you have a num
On Sun, Nov 16, 2008 at 02:52:10PM +0100, Oliver Bandel wrote:
> OK, but I thought, when touching the data, it will
> recalculate the levels. Now I see, it does not.
No it doesn't - for the reasons given in my explanation.
> > >> x <- factor(c('A','B','C','A','C'))
> > >> y <- x[x!='C']
> > >> y
Zitat von "Weiss, Bernd " <[EMAIL PROTECTED]>:
> Philipp Pagel schrieb:
> >> * when then looking at str(weblog),
> >>the "-" will stay in the levels, mentioned for the variable
> weblog$V8
> >>-> BAD!
> >>
> >> Is this snormal behaviour?
> >
> > Yes, it is. The idea is that a factor has a
Philipp Pagel schrieb:
* when then looking at str(weblog),
the "-" will stay in the levels, mentioned for the variable weblog$V8
-> BAD!
Is this snormal behaviour?
Yes, it is. The idea is that a factor has a given set of levels
independent of how often you find them in your data - inclu
> * when then looking at str(weblog),
>the "-" will stay in the levels, mentioned for the variable weblog$V8
>-> BAD!
>
> Is this snormal behaviour?
Yes, it is. The idea is that a factor has a given set of levels
independent of how often you find them in your data - including
the case th
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
On Sunday 03 August 2008 01:54:43 pm Andrew Ramsey wrote:
> Hello--
>
> I am a relatively new user to R and I cannot find the information I
> need. Please help.
>
> I have a very large data set with values including letters, numbers,
> and symbols (sometimes within the same vector value [ie X9-].
>
Exactly how is the translation of "X9-" -> 00911 done? Are there
unique mappings of character sequences to numbers? How many different
ones might there be? Why do you have leading zeros on the result?
If they are changed to numeric, then the default printing results in
'911'. Can you provide a
Hello--
I am a relatively new user to R and I cannot find the information I
need. Please help.
I have a very large data set with values including letters, numbers,
and symbols (sometimes within the same vector value [ie X9-].
I've imported the data using read.fwp and it arrives in list fo
11 matches
Mail list logo