Re: [R] Obtaining a value of pie in a zero inflated model (fm-zinb2)

2024-01-04 Thread Christopher W. Ryan via R-help
Are you referring to the zeroinfl() function in the countreg package? If so, I think predict(fm_zinb2, type = "zero", newdata = some.new.data) will give you pi for each combination of covariate values that you provide in some.new.data where pi is the probability to observe a zero from the point

Re: [R] anyone having trouble accesing CRAN?

2023-11-15 Thread Christopher W. Ryan via R-help
Ah, thanks all. Guess I missed the message before they started the maintenance. --Chris Ivan Krylov wrote: > On Wed, 15 Nov 2023 14:13:00 -0500 > "Christopher W. Ryan via R-help" wrote: > >> Anyone seeing similar? > > Same for me. > > While it worked, C

[R] anyone having trouble accesing CRAN?

2023-11-15 Thread Christopher W. Ryan via R-help
at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the

Re: [R] make a lattice dotplot with symbol size proportional to a variable in the plotted dataframe

2023-11-08 Thread Christopher W. Ryan via R-help
Very helpful, Deepayan, and educational. Thank you. What does NSE stand for? Thanks, Chris Deepayan Sarkar wrote: > > --Chris Ryan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Sum data according to date in sequence

2023-11-02 Thread Christopher W. Ryan via R-help
date appears to be a character variable, and R is treating it as such. str(dt1) might give you some insight. Or the dplyr equivalent glimpse(dt1) I think R did what you asked, but if you want to be able to order records by date, in temporal order, you need to tell R that it is a date:

Re: [R] Amazing AI

2022-12-19 Thread Christopher W. Ryan via R-help
In clinical medicine, the question the patient asks rarely represents their main concern. Most of what I've done in my career, and most of what I've taught, is about how to have the back-and-forth dynamic dialoq with the patient, to help them formulate what's really on their mind, and make sure I

Re: [R] Circular Graph Recommendation Request

2022-05-29 Thread Christopher W. Ryan via R-help
If the units of analysis are real spatial regions (e.g. states), how about a cartogram? https://gisgeography.com/cartogram-maps/ An R package (I have no experience with it) https://cran.r-project.org/web/packages/cartogram/index.html The advantage of a cartogram is that it is a single graphic,

Re: [R] [External Email] Re: how to rename variables by lopping off first 3 characters

2022-03-14 Thread Christopher W Ryan via R-help
"The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Mon, Mar 14, 2022 at 9:27 AM Christopher W Ryan via R-help > wrote: > > > >

[R] the opposite of pluck() in purrr

2021-11-18 Thread Christopher W. Ryan via R-help
I've just learned about pluck() and chuck() in the purrr package. Very cool! As I understand it, they both will return one element of a list, either by name or by [[]] index, or even "first" or "last" I was hoping to find a way to return all *but* one specified element of a list. Speaking

Re: [R] [External Email] Re: how to make the far right section of a smoother line look different from the rest of that line?

2021-11-16 Thread Christopher W Ryan via R-help
e with having an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Tue, Nov 16, 2021 at 7:45 AM Christopher W Ryan via R-help < > r-help@r-project.

[R] how to make the far right section of a smoother line look different from the rest of that line?

2021-11-16 Thread Christopher W Ryan via R-help
eclrs.3 %>% mutate(start.week = floor_date(realCollectionDate, unit = "week")) %>% group_by(start.week, k12) %>% summarise(n = n(), pctpos = 100 * mean(realResult)) %>% xyplot(pctpos ~ start.week | k12, col = "red", data = ., layout = c(1,2), ylab = "percent of test results positive", xlab =

Re: [R] [External Email] Live Online Training for High School Teachers and Students

2021-11-04 Thread Christopher W Ryan via R-help
Tracy-- I enjoy doing this sort of thing. Over the years I've done two full-day "introduction to R" workshops for high school students. The workshops also inevitably get into software-agnostic, basic issues about how to think about data, and how to measure, record, and store it---which is all

Re: [R] [External Email] Group by and add a constant value based on a condition dply

2021-05-26 Thread Christopher W Ryan via R-help
Is the grouping beforehand necessary? Could you simply, "for all the dates that are "4.01.2020" and have the "Value" greater than zero add 5 to the "Value" "? I may be missing something. --Chris Ryan On Wed, May 26, 2021 at 11:53 AM Elahe chalabi via R-help < r-help@r-project.org> wrote: >