Re: [R] select portion of text file using R

2015-04-28 Thread Duncan Mackay
similar to above for the different sections I suggest you read up on regular expressions - I use them every day in various ways. ? sub and follow the prompts as well as the page Duncan -Original Message----- From: Luigi Marongiu [mailto:marongiu.lu...@gmail.com] Sent: Wednesday, 29 April

Re: [R] select portion of text file using R

2015-04-27 Thread Duncan Mackay
oject.org] On Behalf Of Luigi Marongiu Sent: Tuesday, 28 April 2015 07:20 To: Duncan Murdoch; r-help Subject: Re: [R] select portion of text file using R Dear Duncan, thank you for your reply, I tried to read the file using skip and nrows but it did not work. Here i am pasting the code I wrote a

Re: [R] select portion of text file using R

2015-04-27 Thread jim holtman
try this. It read in all the data and discards the lines not required. > # read in the data and delete lines not required > data_in <- readLines(textConnection("HEAD OF MYDATA + * Block Type = Array Card Block + * Calibration Background is expired = No + * Calibration Background performed on =

Re: [R] select portion of text file using R

2015-04-27 Thread Duncan Murdoch
On 27/04/2015 5:20 PM, Luigi Marongiu wrote: > Dear Duncan, > thank you for your reply, > I tried to read the file using skip and nrows but it did not work. What does that mean? We might be able to be more help if you tell us what happened when you tried the code below. > Here i am pasting the c

Re: [R] select portion of text file using R

2015-04-27 Thread Luigi Marongiu
Dear Duncan, thank you for your reply, I tried to read the file using skip and nrows but it did not work. Here i am pasting the code I wrote and the head of the file i need to read. Probably the error is due to the fact that the column "well" has duplication, but how can i add a row column with uni

Re: [R] select portion of text file using R

2015-04-20 Thread Duncan Murdoch
On 20/04/2015 3:28 AM, Luigi Marongiu wrote: > Dear all, > I have a flat file (tab delimited) derived from an excel file which is > subdivided in different parts: a first part is reporting metadata, > then there is a first spreadsheet indicated by [ ], then the actual > data and the second spreadsh