error in split...
A.J. Rossini
rossini@biostat.washington.edu
Wed, 20 Oct 1999 17:19:02 -0700 (PDT)
Date: 20 Oct 1999 17:19:02 -0700
Message-ID: <87yacx36rt.fsf@alpha.cfas.washington.edu>
Lines: 62
(repeated:
> version
_
platform i686-unknown-linux
arch i686
os linux
system i686, linux
status Release
major 0
minor 65.1
year 1999
month October
day 07
language R
>
)
Just saw the following which looked strange (Thomas, I'll bug you
about it tommorow...):
(ctl and group are factors, vectors of strings; ddna is a vector of
#'s)
Does it have to do with the number of quotes?
best,
-tony
> ctl.x.group <- interaction(ctl,group)
> my.list <- split(ddna,ctl.x.group)
Error in split(x, f) : second argument must be a factor
> is.factor(ctl.x.group)
[1] TRUE
> ### Thoughts? here's ctl and group (trimmed for space):
> ctl
[1] \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\"
[7] \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\"
[13] \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\" \"CTL\"
[1783] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1789] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1795] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1801] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1807] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1813] \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\" \"NONCTL\"
[1819] \"NONCTL\" \"NONCTL\"
Levels: "CTL" "NONCTL"
>
> group
[1] \"L\" \"P\" \"L\" \"P\" \"L\" \"R\" \"L\" \"L\" \"R\" \"R\" \"A\" \"L\"
[13] \"R\" \"R\" \"R\" \"L\" \"R\" \"R\" \"R\" \"L\" \"L\" \"L\" \"A\" \"P\"
[25] \"R\" \"P\" \"P\" \"L\" \"L\" \"R\" \"L\" \"R\" \"L\" \"P\" \"P\" \"P\"
[37] \"P\" \"R\" \"A\" \"L\" \"A\" \"P\" \"P\" \"L\" \"R\" \"P\" \"R\" \"P\"
[49] \"R\" \"P\" \"R\" \"R\" \"R\" \"A\" \"R\" \"L\" \"R\" \"L\" \"R\" \"A\"
[61] \"P\" \"R\" \"R\" \"R\" \"R\" \"R\" \"P\" \"P\" \"P\" \"L\" \"R\" \"A\"
[1765] \"L\" \"P\" \"P\" \"P\" \"L\" \"L\" \"L\" \"P\" \"L\" \"P\" \"L\" \"L\"
[1777] \"P\" \"R\" \"L\" \"P\" \"L\" \"R\" \"R\" \"L\" \"A\" \"L\" \"A\" \"P\"
[1789] \"P\" \"P\" \"A\" \"A\" \"L\" \"L\" \"L\" \"P\" \"L\" \"P\" \"R\" \"L\"
[1801] \"L\" \"A\" \"R\" \"P\" \"L\" \"P\" \"L\" \"L\" \"L\" \"L\" \"L\" \"L\"
[1813] \"R\" \"P\" \"L\" \"R\" \"A\" \"L\" \"A\" \"L\"
Levels: "A" "L" "P" "R"
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._