Re: [R] removing non-table lines

2022-09-19 Thread Eric Berger
omment="string" in the tidyverse function read_csv(). > > And, of course you can skip lines if that makes sense albeit it can be tricky > with header lines. > > -Original Message- > From: R-help On Behalf Of Rui Barradas > Sent: Sunday, September 18, 2022 6:19

Re: [R] removing non-table lines

2022-09-18 Thread avi.e.gross
v(). And, of course you can skip lines if that makes sense albeit it can be tricky with header lines. -Original Message- From: R-help On Behalf Of Rui Barradas Sent: Sunday, September 18, 2022 6:19 PM To: Nick Wray ; r-help@r-project.org Subject: Re: [R] removing non-table lines H

Re: [R] removing non-table lines

2022-09-18 Thread Rui Barradas
Helo, Unfortunatelly there are many files with a non tabular data section followed by the data. R's read.table has a skip argument: skip integer: the number of lines of the data file to skip before beginning to read data. If you do not know how many lines to skip because it's not

Re: [R] removing non-table lines

2022-09-18 Thread Jeff Newmiller
Use the skip parameter if the number of header lines is always the same. On September 18, 2022 12:39:50 PM PDT, Nick Wray wrote: >Hello - I am having to download lots of rainfall and temperature data in >csv form from the UK Met Office. The data isn't a problem - it's in nice >columns and can

Re: [R] removing non-table lines

2022-09-18 Thread CALUM POLWART
Can you provide a sample of say the first 3 rows then the last 2 rows before the CSV starts. Are there always the same number of lines at the top? Or can it vary depending what non-sense the Met Office decided to contaminate it with? This should be solvable with some sample data. Base R or

[R] removing non-table lines

2022-09-18 Thread Nick Wray
Hello - I am having to download lots of rainfall and temperature data in csv form from the UK Met Office. The data isn't a problem - it's in nice columns and can be read into R easily - the problem is that in each csv there are 60 or so lines of information first which are not part of the