Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Avi Gross via R-help
road and hit ggplot() to make graphs, factors may be useful in various kinds of fine tuning. -Original Message- From: R-help On Behalf Of Rich Shepard Sent: Tuesday, September 14, 2021 1:59 PM To: r-help@r-project.org Subject: Re: [R] Need fresh eyes to see what I'm missing On Tue,

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Bert Gunter wrote: **Don't do this.*** You will make errors. Use fit-for-purpose tools. That's what R is for. Also, be careful **how** you "download", as that already may bake in problems. Bert, Haven't had downloading errors saving displayed files. The problem with the

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Bert Gunter
Inline. On Tue, Sep 14, 2021 at 10:42 AM Rich Shepard wrote: > > On Tue, 14 Sep 2021, Eric Berger wrote: > > > My suggestion was not 'to make a difference'. It was to determine whether > > the NAs or NaNs appear before the dplyr commands. You confirmed that they > > do. There are 2321 NAs in vel

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Bert Gunter wrote: Input problems of this sort are often caused by stray or extra characters (commas, dashes, etc.) in the input files, which then can trigger automatic conversion to character. Excel files are somewhat notorious for this. Bert, Large volume of missing dat

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Eric Berger wrote: My suggestion was not 'to make a difference'. It was to determine whether the NAs or NaNs appear before the dplyr commands. You confirmed that they do. There are 2321 NAs in vel. Bert suggested some ways that an NA might appear. Eric, Yes, you're all co

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Eric Berger
Hi Rich, My suggestion was not 'to make a difference'. It was to determine whether the NAs or NaNs appear before the dplyr commands. You confirmed that they do. There are 2321 NAs in vel. Bert suggested some ways that an NA might appear. Best, Eric On Tue, Sep 14, 2021 at 6:42 PM Rich Shepard wr

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Bert Gunter wrote: Input problems of this sort are often caused by stray or extra characters (commas, dashes, etc.) in the input files, which then can trigger automatic conversion to character. Excel files are somewhat notorious for this. Bert, Yes, I'm going to closely r

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Bert Gunter
Input problems of this sort are often caused by stray or extra characters (commas, dashes, etc.) in the input files, which then can trigger automatic conversion to character. Excel files are somewhat notorious for this. A couple of comments, and then I'll quit, as others should have greater insigh

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Avi Gross via R-help
ve it again. That is beyond the scope of this mailing list so if needed, ask me in private. You have been working on this kind of stuff, but I assume often using other tools outside R and dplyr. -Original Message- From: R-help On Behalf Of Rich Shepard Sent: Tuesday, September 14, 2021 1

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Avi Gross via R-help
Rich Shepard Sent: Tuesday, September 14, 2021 11:21 AM To: r-help@r-project.org Subject: [R] Need fresh eyes to see what I'm missing The data file begins this way: year,month,day,hour,min,fps 2016,03,03,12,00,1.74 2016,03,03,12,10,1.75 2016,03,03,12,20,1.76 2016,03,03,12,30,1.81 2016,03,03,

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Bert Gunter wrote: Remove all your as.integer() and as.double() coercions. They are unnecessary (unless you are preparing input for C code; also, all R non-integers are double precision) and may be the source of your problems. Bert, Are all columns but the fps factors? R

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Bert Gunter wrote: Remove all your as.integer() and as.double() coercions. They are unnecessary (unless you are preparing input for C code; also, all R non-integers are double precision) and may be the source of your problems. Bert, When I remove coercions the script prod

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
On Tue, 14 Sep 2021, Eric Berger wrote: Before you create vel_by_month you can check vel for NAs and NaNs by sum(is.na(vel)) sum(unlist(lapply(vel,is.nan))) Eric, There should not be any missing values in the data file. Regardless, I added those lines to the script and it made no difference.

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Bert Gunter
Remove all your as.integer() and as.double() coercions. They are unnecessary (unless you are preparing input for C code; also, all R non-integers are double precision) and may be the source of your problems. Bert Gunter "The trouble with having an open mind is that people keep coming along and st

Re: [R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Eric Berger
Before you create vel_by_month you can check vel for NAs and NaNs by sum(is.na(vel)) sum(unlist(lapply(vel,is.nan))) HTH, Eric On Tue, Sep 14, 2021 at 6:21 PM Rich Shepard wrote: > The data file begins this way: > year,month,day,hour,min,fps > 2016,03,03,12,00,1.74 > 2016,03,03,12,10,1.75 > 2

[R] Need fresh eyes to see what I'm missing

2021-09-14 Thread Rich Shepard
The data file begins this way: year,month,day,hour,min,fps 2016,03,03,12,00,1.74 2016,03,03,12,10,1.75 2016,03,03,12,20,1.76 2016,03,03,12,30,1.81 2016,03,03,12,40,1.79 2016,03,03,12,50,1.75 2016,03,03,13,00,1.78 2016,03,03,13,10,1.81 The script to process it: library('tidyverse') vel <- read.csv