An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130111/3aa29e43/attachment-0001.pl>
Extract data
3 messages · shairul samat, PIKAL Petr, John Kane
Hi No HTML. No highlighting. if you want some data from object use extraction operator ?"[" Petr
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of shairul samat Sent: Friday, January 11, 2013 10:19 AM To: r-help at r-project.org Subject: [R] Extract data Dear R users, I just join this forum a few minutes ago. My friend recommend this forum to me. I have data in excel csv. My problem is I would like to extract some number, for example as highlighted below; Year Ending?????????? Maximum Value (Rain mm) ?Gap from 19710509 090000 to 19710607 080000 of?? 28.96 Days 19710629 080000(PARTIAL)?????? 39.3 at interval beginning 19701126 010326 ?Gap from 19710809 110221 to 19710816 080000 of??? 6.87 Days ?Gap from 19720207 070000 to 19720303 080000 of?? 25.04 Days ?Gap from 19720424 070000 to 19720504 080000 of?? 10.04 Days 19720629 080000(PARTIAL)?????? 33.8 at interval beginning 19720517 144507 ?Gap from 19720913 090000 to 19720918 080000 of??? 4.96 Days ?Gap from 19720929 150000 to 19721006 080000 of??? 6.71 Days ?Gap from 19730129 070000 to 19730226 080000 of?? 28.04 Days ?Gap from 19730531 030203 to 19730607 080000 of??? 7.21 Days 19730629 080000(PARTIAL)?????? 32.2 at interval beginning 19720910 135747 ?Gap from 19731031 154200 to 19731205 080000 of?? 34.68 Days ?Gap from 19740301 121500 to 19740425 080000 of?? 54.82 Days 19740629 080000(PARTIAL)?????? 38.9 at interval beginning 19731003 124849 So, how do i do that. Thank you so much for any help given. [[alternative HTML version deleted]]
Hi, welcome to the R-help list This help list does not accept html coded messages and so nothing meaningful seems to have come through. If you aready have the data loaded into R please supply some sample data The easiest way to supply data is to use the dput() function. Example with your file named "testfile": dput(testfile) Then copy the output and paste into your email. For large data sets, you can just supply a representative sample. Usually, dput(head(testfile, 100)) will be sufficient. Otherwise perhaps you could mock up some data or place a file as some place such as mediafire or dropbox where readers can access it. Here is a link that suggests some ways to ask a good question on the list https://github.com/hadley/devtools/wiki/Reproducibility The more you follow the suggestions and provide meaningfull examples, code or general information about your installation the faster people may be able to help you. John Kane Kingston ON Canada
-----Original Message----- From: shairul81 at yahoo.com Sent: Fri, 11 Jan 2013 01:18:47 -0800 (PST) To: r-help at r-project.org Subject: [R] Extract data Dear R users, I just join this forum a few minutes ago. My friend recommend this forum to me. I have data in excel csv. My problem is I would like to extract some number, for example as highlighted below; Year Ending Maximum Value (Rain mm) Gap from 19710509 090000 to 19710607 080000 of 28.96 Days 19710629 080000(PARTIAL) 39.3 at interval beginning 19701126 010326 Gap from 19710809 110221 to 19710816 080000 of 6.87 Days Gap from 19720207 070000 to 19720303 080000 of 25.04 Days Gap from 19720424 070000 to 19720504 080000 of 10.04 Days 19720629 080000(PARTIAL) 33.8 at interval beginning 19720517 144507 Gap from 19720913 090000 to 19720918 080000 of 4.96 Days Gap from 19720929 150000 to 19721006 080000 of 6.71 Days Gap from 19730129 070000 to 19730226 080000 of 28.04 Days Gap from 19730531 030203 to 19730607 080000 of 7.21 Days 19730629 080000(PARTIAL) 32.2 at interval beginning 19720910 135747 Gap from 19731031 154200 to 19731205 080000 of 34.68 Days Gap from 19740301 121500 to 19740425 080000 of 54.82 Days 19740629 080000(PARTIAL) 38.9 at interval beginning 19731003 124849 So, how do i do that. Thank you so much for any help given. [[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.
____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM?, MSN? Messenger, Yahoo!? Messenger, ICQ?, Google Talk? and most webmails