s-news
[Top] [All Lists]

converting a file name to the name of a table

To: s-news@lists.biostat.wustl.edu
Subject: converting a file name to the name of a table
From: carol white <wht_crl@yahoo.com>
Date: Wed, 16 May 2007 11:24:48 -0700 (PDT)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=oKdhs/T3VyinisrcdHXdgc2I5VhhcCbGaRbcYQ80MsPP1zpka5NvUjsgh32axy9g51bXYd4/frt1gNyy9T8GKh2zUPrF+ks+U4qrStLPiVW0xtgBCfUDPsw876gV1eT1FV0awceoyuP/BpRuCuHWa9pfeZhgrGR0ZXkm7IfwMLQ=;
Hi,
is there anyway to name a table that i create by read.table by the name of the file from which the content is read into the table?

I want to read the files in the current directory and into a table whose name is the name of the file. I tried as.name but doesn't work
 
files.lst = list.files(".")
 for (i in 1:length(files.lst))
+ as.name(files.lst[i]) =  read.table (files.lst[i], check.names = F, header = T)

thanks

carol


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
<Prev in Thread] Current Thread [Next in Thread>