[R] subsetting data file by intoducing a second file

2013-02-12 Thread Ozgul Inceoglu
Hello, I have a very data matrix and I have a file which has the names that I need to subset. However I cannot manage to subset the main file. ANy idea? bg - read.table (file.choose(), header=T, row.names) bg Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131

Re: [R] subsetting data file by intoducing a second file

2013-02-12 Thread Rui Barradas
Hello, Read the help page ?subset more carefully, it's argument 'select' you should be using: subset(bg, select = c_bg) Hope this helps, Rui Barradas Em 12-02-2013 14:29, Ozgul Inceoglu escreveu: Hello, I have a very data matrix and I have a file which has the names that I need to

Re: [R] subsetting data file by intoducing a second file

2013-02-12 Thread arun
, February 12, 2013 9:29 AM Subject: [R] subsetting data file by intoducing a second file Hello, I have a very data matrix and I have a file which has the names that I need to subset. However I cannot manage to subset the main file. ANy idea? bg - read.table (file.choose(), header=T, row.names) bg

Re: [R] subsetting data file by intoducing a second file

2013-02-12 Thread Eik Vettorazzi
Hi Ozgul, the interesting part is the select parameter in subset: subset(bg,select=c_bg[,1]) cheers Am 12.02.2013 15:29, schrieb Ozgul Inceoglu: Hello, I have a very data matrix and I have a file which has the names that I need to subset. However I cannot manage to subset the main file.