Re: [R] Odd result

2023-09-29 Thread peter dalgaard
Yes. Also notice that something fishy seems to be going on in columns 2 and 3 (assuming that the date/time is 1 column). They appear to be read as character data, even though the content is numeric? -pd > On 24 Sep 2023, at 11:58 , Michael Dewey wrote: > > Dear David > > To get the first 46

Re: [R] Odd result

2023-09-24 Thread avi.e.gross
A B 1 1 0 2 2 1 3 3 2 4 4 3 5 5 4 6 6 5 7 7 6 8 8 7 9 9 8 -Original Message- From: R-help On Behalf Of Parkhurst, David Sent: Saturday, September 23, 2023 6:55 PM To: r-help@r-project.org Subject: [R] Odd result With help from several people, I used file.choose()

Re: [R] Odd result

2023-09-24 Thread Ben Bolker
For what it's worth the janitor::remove_empty() (which removes all-NA rows by default, can be set to remove columns instead) can be useful for this kind of cleanup. On 2023-09-24 5:58 a.m., Michael Dewey wrote: Dear David To get the first 46 rows just do KurtzData[1:43,] However really

Re: [R] Odd result

2023-09-24 Thread Ebert,Timothy Aaron
st, David ; r-help@r-project.org Subject: Re: [R] Odd result [External Email] On 23/09/2023 6:55 p.m., Parkhurst, David wrote: > With help from several people, I used file.choose() to get my file name, and > read.csv() to read in the file as KurtzData. Then when I print KurtzData, > the

Re: [R] Odd result

2023-09-24 Thread Duncan Murdoch
On 23/09/2023 6:55 p.m., Parkhurst, David wrote: With help from several people, I used file.choose() to get my file name, and read.csv() to read in the file as KurtzData. Then when I print KurtzData, the last several lines look like this: 39 5/31/22 16.0 3411.75525

Re: [R] Odd result

2023-09-24 Thread Michael Dewey
Dear David To get the first 46 rows just do KurtzData[1:43,] However really you want to find out why it happened. It looks as though the .csv file you read has lots of blank lines at the end. I would open it in an editor to check that. Michael On 23/09/2023 23:55, Parkhurst, David wrote:

[R] Odd result

2023-09-24 Thread Parkhurst, David
With help from several people, I used file.choose() to get my file name, and read.csv() to read in the file as KurtzData. Then when I print KurtzData, the last several lines look like this: 39 5/31/22 16.0 3411.75525 0.0201 0.0214 7.00 40 6/28/22 2:00 PM 0.0