Re: [R] How to fix this problem

2023-09-25 Thread CALUM POLWART
y, September 25, 2023 11:09 AM > To: avi.e.gr...@gmail.com; 'Parkhurst, David' ; > r-help@r-project.org > Subject: Re: [R] How to fix this problem > > [External Email] > > It looks here as though the E coli column has commas in it so will be > treated as character.

Re: [R] How to fix this problem

2023-09-25 Thread Ebert,Timothy Aaron
l Dewey Sent: Monday, September 25, 2023 11:09 AM To: avi.e.gr...@gmail.com; 'Parkhurst, David' ; r-help@r-project.org Subject: Re: [R] How to fix this problem [External Email] It looks here as though the E coli column has commas in it so will be treated as character. Michael On 25/09/202

Re: [R] How to fix this problem

2023-09-25 Thread Michael Dewey
It looks here as though the E coli column has commas in it so will be treated as character. Michael On 25/09/2023 15:45, avi.e.gr...@gmail.com wrote: David, This may just be the same as your earlier problem. When the type of a column is guessed by looking at the early entries, any non-numeri

Re: [R] How to fix this problem

2023-09-25 Thread avi.e.gross
David, This may just be the same as your earlier problem. When the type of a column is guessed by looking at the early entries, any non-numeric entry forces the entire column to be character. Suggestion: fix your original EXCEL FILE or edit your CSV to remove the last entries that look just li

Re: [R] How to fix this problem

2023-09-25 Thread Ivan Krylov
On Sun, 24 Sep 2023 18:05:43 + "Parkhurst, David" wrote: > I have a matrix, KD6, and I_m trying to get a correlation matrix from > it. When I enter cor(KD6), I get the message _Error in cor(KD6) : > 'x' must be numeric_. > Here are some early lines from KD6: >Flow E..coliTN

Re: [R] How to fix this problem

2023-09-25 Thread Ivan Calandra
Dear David, simply check str(KD6). My guess (because we don't have your dataset, only a print of it) is that KD6 is not a matrix but a data.frame. The problem seems to come from the column "E..coli" which contains commas instead of periods (so text and not number). There might be other issues