s-news
[Top] [All Lists]

Re: Creating a data frame of NAs

To: "'Khan, Sohail'" <khan@cshl.edu>, <s-news@lists.biostat.wustl.edu>
Subject: Re: Creating a data frame of NAs
From: "John Fox" <jfox@mcmaster.ca>
Date: Fri, 17 Feb 2006 15:33:02 -0500
In-reply-to: <C8696843AE995F4EA4CDC3E2B83482A901878F7D@mailbox02.cshl.edu>
Thread-index: AcYz/ypriYkILfaDTXWxcp9FWDmD9AAAbDgg
Dear Sohail,

One way would be,

Data <- as.data.frame(matrix(NA, 65000, 37))

John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: s-news-owner@lists.biostat.wustl.edu 
> [mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of 
> Khan, Sohail
> Sent: Friday, February 17, 2006 3:17 PM
> To: s-news@lists.biostat.wustl.edu
> Subject: [S] Creating a data frame of NAs
> 
> Dear List,
> 
> Sorry, this is really an elementary question.  How would I 
> create a data frame of NA with 65000 rows and 37 columns?
> Thanks.
> 
> 
> Sohail Khan
> Scientific Programmer
> COLD SPRING HARBOR LABORATORY
> Genome Research Center
> 500 Sunnyside Boulevard
> Woodbury, NY 11797
> (516)422-4076
> 
> --------------------------------------------------------------------
> This message was distributed by 
> s-news@lists.biostat.wustl.edu.  To unsubscribe send e-mail 
> to s-news-request@lists.biostat.wustl.edu with the BODY of 
> the message:  unsubscribe s-news


<Prev in Thread] Current Thread [Next in Thread>