HI, Valerie,

Thanks for the information!

>
hh.full<-read.columns("/house/homedirs/c/cdu/operon/gh/dd.dimer",required.col=NULL,
sep="\t", skip=0, quote="", fill=T)
> colnames(hh.full)
   [1] "gene_id" "A{5}A"   "A{5}C"   "A{5}D"   "A{5}E"   "A{5}F"   "A{5}G"
*
My variables names are right and same as my original file(dd.dimer)*

But when I use the following codes:
> dimer.hh<-read.table("/house/homedirs/c/cdu/operon/gh/dd.dimer", sep="\t",
skip=0, quote="", header=T, fill=T)
> colnames(dimer.hh)
   [1] "gene_id" "A.5.A"   "A.5.C"   "A.5.D"   "A.5.E"   "A.5.F"   "A.5.G"

The variables names changed. the { } are changed to .. , I dont know how?

Thanks!





On Mon, Jun 27, 2011 at 7:02 AM, Valerie Obenchain <vobencha@fhcrc.org>wrote:

> Hi Changbin,
>
> Looking at the documentation for read.columns in the limma package, the
> required.col argument should select the columns you want.
>
> It looks like you were successful in reading in all of the data on your
> first try. Check the column names in that file to be sure they match the
> names you are inputting with the variable "var". For example,
>
>    myfile <- "/house/homedirs/c/cdu/operon/**gh/dd.dimer"
>    hh_full <- read.columns(myfile, quote="")
>    colnames(hh)
>
> You should see the column names you expect, then try selecting the columns
> with
>
>    var<-c("a1", "c1", "a11", "b11", "f111")
>    hh_reduced <- read.columns(myfile, required.col=var, quote="")
>
> Valerie
>
>
>
>
>
>
>
>
> On 06/24/11 15:21, Changbin Du wrote:
>
>> Dear Bioconductor community,
>>
>> I am using your read.columns to read some columns into R, I found the
>>
>>
>>> following problems, can you help me?
>>>
>>> I have a large data set names dd.txt, the *columns* are: there are 2402
>>> variables.
>>>
>>> a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111..
>>>
>>> IF I dont know the *relative* position of the *columns*, but I know I
>>> need
>>> the
>>> following variables:
>>> var<-c(a1, c1,a11,b11,f111)
>>>
>>> Can I *use* *read*.*columns* *to* *read* the data *into* *R*?
>>>
>>> I have tried the following codes, but it does not work
>>>
>>> hh<-*read*.*columns*("/house/**homedirs/c/cdu/operon/gh/dd.**dimer",
>>> *required*.col=NULL, text.*to*.search=var, sep="\t", skip=0, quote="",
>>> fill=T)
>>>
>>> dim(hh)
>>> 468, 2402
>>>
>>>
>>> hh<-*read*.*columns*("/house/**homedirs/c/cdu/operon/gh/dd.**dimer",
>>> *required*.col=var, text.*to*.search="", sep="\t", skip=0, quote="",
>>> fill=T)
>>>
>>> dim(hh)
>>> 0, 0
>>>
>>> Thanks so much!
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>


-- 
Sincerely,
Changbin
--

Changbin Du
DOE Joint Genome Institute
Bldg 400 Rm 457
2800 Mitchell Dr
Walnut Creet, CA 94598
Phone: 925-927-2856

	[[alternative HTML version deleted]]

