[BioC] question about the read.columns

Valerie Obenchain vobencha at fhcrc.org
Mon Jun 27 16:02:22 CEST 2011


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!
>>
>>
>>
>>
>>      
>
>
>



More information about the Bioconductor mailing list