From Kevin.Wright@pioneer.com  Thu Jun 27 17:13:53 2002
From: Kevin.Wright@pioneer.com (Kevin.Wright@pioneer.com)
Date: Thu, 27 Jun 2002 18:13:53 +0200 (MET DST)
Subject: data.frame does not recycle consistently (PR#1713)
Message-ID: <200206271613.SAA05140@pubhealth.ku.dk>

Full_Name: Kevin Wright
Version: 1.5.1
OS: Windows 95
Submission from: (NULL) (170.54.59.160)



Note that the examples below do work in S (S-Plus 2000).

It appears that data.frame does not recycle text strings.  Maybe has something
to do with coercion to factors???

> data.frame(x=1:2,y=1)
  x y
1 1 1
2 2 1

> data.frame(x=c("A","B"),y=T)
  x    y
1 A TRUE
2 B TRUE

> data.frame(x=c("A","B"),y="C")
Error in data.frame(x = c("A", "B"), y = "C") : 
        arguments imply differing number of rows: 2, 1


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


data.frame does not recycle consistently (PR#1713)
Kevin.Wright@pioneer.com