Soyoung Jang
2011-Jun-03 03:21 UTC
[R] how do I extract a certain column from a dataframe without headers???
The following are the first 6 rows of the data...I named it "file" and I have no idea how I can extract column 15, because there are no headers in this data.Can you please help me with that? Thank you! 40 37 1 1 8 8 40 40 1 7 1 0 40 0 41344 7160 49158 21643 3246 1 4 2 25240 1 65809 58387 1135 35 1 1 8 8 39 39 2 6 1 0 0 0 31700 5260 36960 18987 2848 1 3 1 25239 1 64020 58387 1156 53 1 1 8 8 43 39 1 1 4 1 40 32 31025 19025 50050 37699 5654 1 2 0 25237 1 60192 55785 1171 69 1 1 8 8 39 39 5 5 0 0 0 0 7549 7320 14869 0 0 1 2 0 25236 1 54845 54960 1133 40 1 1 8 8 39 42 1 1 1 1 55 46 23992 14052 38044 20559 3083 1 4 2 25212 1 111975 110540 1138 37 1 1 8 8 40 39 1 1 3 1 40 30 23025 13385 36410 19207 2881 1 4 2 25209 1 114615 112468 11 [[alternative HTML version deleted]]
David Winsemius
2011-Jun-03 04:38 UTC
[R] how do I extract a certain column from a dataframe without headers???
On Jun 2, 2011, at 11:21 PM, Soyoung Jang wrote:> > The following are the first 6 rows of the data...I named it "file" > and I have no idea how I can extract column 15,But, how did you make it. Is it a data.frame or a matrix?> because there are no headers in this data.Can you please help me > with that?Perhaps: named_object[ , 15]> Thank you! > > > 40 37 1 1 8 8 40 40 1 7 1 0 40 0 41344 7160 49158 21643 > 3246 1 4 2 25240 1 65809 58387 1135 35 1 1 8 8 39 39 2 6 1 > 0 0 0 31700 5260 36960 18987 2848 1 3 1 25239 1 > 64020 58387 1156 53 1 1 8 8 43 39 1 1 4 1 40 32 31025 > 19025 50050 37699 5654 1 2 0 25237 1 60192 55785 1171 69 > 1 1 8 8 39 39 5 5 0 0 0 0 7549 7320 14869 0 0 > 1 2 0 25236 1 54845 54960 1133 40 1 1 8 8 39 42 1 1 1 1 55 > 46 23992 14052 38044 20559 3083 1 4 2 25212 1 111975 > 110540 1138 37 1 1 8 8 40 39 1 1 3 1 40 30 23025 13385 > 36410 19207 2881 1 4 2 25209 1 114615 112468 11 > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD West Hartford, CT
Maybe Matching Threads
- coxph fails to survfit
- setMethod sometimes fails to set package slot when signature has trailing 'ANY'
- paginate :includes not working as I thought it should
- [ wxruby-Bugs-16279 ] undefined methods ''load_panel_subclass'' for Wx::XmlResource
- Great work on wxRuby2