Skip to content
Back to formatted view

Raw Message

Message-ID: <BANLkTi=LpakWNrFfRTUyWCWFtbH4OY+t5A@mail.gmail.com>
Date: 2011-04-27T14:17:55Z
From: Hadley Wickham
Subject: Empty Data Frame
In-Reply-To: <BANLkTik37+qyZhsxf4G=PG4tvg1+qimp5Q@mail.gmail.com>

On Wed, Apr 27, 2011 at 4:58 AM, Dennis Murphy <djmuser at gmail.com> wrote:
> Hi:
>
> You could try something like
>
> df <- data.frame( expand.grid( Week = 1:52, Year = 2002:2011 ))

expand.grid already returns a data frame...  You might want
KEEP.OUT.ATTRS = F though.  Even it feels like you are yelling at R.

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/