error in split?

About this list Date view Thread view Subject view Author view Other groups

Subject: error in split?
From: A.J. Rossini (rossini@biostat.washington.edu)
Date: Thu 21 Oct 1999 - 10:16:10 EST


Message-ID: <87zoxd36wl.fsf@alpha.cfas.washington.edu>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:09 EST