[R] How to fix this problem

2023-09-25 Thread Parkhurst, David
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..coliTNSRP TPTSS 1 38.82,4201.65300 0.0270 0.0630 66.

[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

[R] How to import an excel data file

2023-09-23 Thread Parkhurst, David
I know I should save it as a .csv file, which I have done. I�m told I should use the read_excel() function from the readxl package. My question is, how do I express the location of the file. The file is named KurtzData.csv. Its location in my Mac files is DFPfiles/ae/FriendsMonroe/KurtzData.csv H

Re: [R] Need help plotting

2022-09-20 Thread Parkhurst, David
go out as plain text. Is that true for this response, or is it in HTML? From: Rui Barradas Date: Tuesday, September 20, 2022 at 4:52 AM To: Jim Lemon , Parkhurst, David , r-help mailing list Subject: Re: [R] Need help plotting Hello, Now with data, here are base R and ggplot2 plots.

Re: [R] Converting time format

2022-09-19 Thread Parkhurst, David
Thank you. From: Rui Barradas Date: Monday, September 19, 2022 at 1:28 PM To: Parkhurst, David , R-help@r-project.org Subject: Re: [R] Converting time format Hello, I will run the examples below with the following data: x <- c("12:00", "12:15", "12:30",

Re: [R] Converting time format

2022-09-19 Thread Parkhurst, David
Thank you. I�ll see what I can do with that. From: Rui Barradas Date: Monday, September 19, 2022 at 1:28 PM To: Parkhurst, David , r-help@r-project.org Subject: Re: [R] Converting time format Hello, I will run the examples below with the following data: x <- c("12:00", &q

Re: [R] Need help plotting

2022-09-19 Thread Parkhurst, David
aes(y=NO2, x=datetime)) + geom_point() > > That will be a start as a scatterplot, but the graph can be customized or > changed if scatterplot was not desired. > > Tim > > -Original Message- > From: R-help On Behalf Of Parkhurst, David > Sent: Sunday, September 18, 2

[R] Converting time format

2022-09-19 Thread Parkhurst, David
I have a dataframe obtained using read.csv from an excel file. Its first column is times, running from 18:00 to 19:30. If I want to plot other columns against time, do I need to convert those somehow, and how would I do that? If I run plot(b$time,b$myvar) I get a decent plot, but a friend sugg

[R] Need help plotting

2022-09-19 Thread Parkhurst, David
I�ve been retired since �06 and have forgotten most of R. Now I have a use for it, with some data from Bloomington�s Environmental Commission. I have a dataframe (obtained from read.csv) that contains numerous columns, including time (in Excel�s 18:00 format), and DNO2, and MNO2 from two air q

Re: [R] Remove line from data file

2022-09-19 Thread Parkhurst, David
mean by �value to delete�? Could that just be a row number? I was wanting to delete something like the 18th row in the dataframe? From: CALUM POLWART Date: Sunday, September 18, 2022 at 7:25 AM To: Parkhurst, David Cc: R-help@r-project.org Subject: Re: [R] Remove line from data file From the

[R] Remove line from data file

2022-09-18 Thread Parkhurst, David
I’ve been retired since ‘06 and have forgotten most of R. Now I have a use for it. I’ve created a data file and need to delete one row from it. How do I do that? DFP (iPad) __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:/

[R] Can't save files from the Source pane of R Studio

2021-03-22 Thread Parkhurst, David
I�m just starting to learn and use R Studio in my Mac. Now I find if I type lines in what I think is called the source pane, and use Save as from the menu, nothing gets saved. That�s true if I add the extension .R or the extension .txt. If I try reopen the file in an empty source pane, it�s e

Re: [R] [External] Concatenation?

2021-02-17 Thread Parkhurst, David
Thank you. From: Richard M. Heiberger Date: Wednesday, February 17, 2021 at 4:21 PM To: Parkhurst, David , r-help@r-project.org Subject: Re: [External] [R] Concatenation? > paste(c("A","B","C"), c(1,2,3), sep="") [1] "A1&qu

[R] Concatenation?

2021-02-17 Thread Parkhurst, David
If I have a vector of site abbreviations and a vector of depths in those water bodies, is there a simple way in R to combine them to make a third vector? Examples: sitedepth desired MU 0 MU0 MU 1 MU1 MU 2 MU2 MC 0

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
Thanks. What editor do you use? I'm working in a Mac, if that makes a difference. From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 5:10 PM To: Parkhurst, David F. Cc: r-help@r-project.org Subject: Re: [R] Need help using lattice Ha David, I do not know. It must be that your Apr

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
    labels=AprToDec, ordered=TRUE)) I get + signs in front of monames and labels, again as expected, but then it gives me another + sign. And if I try to add another ), it keeps giving me + signs. What is happening here? From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 6:14 AM To: Park

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
Thank you. From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 6:14 AM To: Parkhurst, David F. Cc: r-help@r-project.org Subject: Re: [R] Need help using lattice Ha David, Thanks for your reply. For your last question, you have to change month into an ordered factor variable: library

[R] Need help using lattice

2021-02-07 Thread Parkhurst, David F.
I have a dataframe comprising a vector of E. coli concentrations, a vector of months when the samples were taken, and a vector of sampled sites. I�d like to produce a lattice with sites along the horizontal axis, and months on the vertical. Each site-month box would then contain concentrations