Re: [R] Create a categorical variable using the deciles of data

2022-06-15 Thread Richard O'Keefe
I had the advantage of studying Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) "The New S Language". Wadsworth & Brooks/Cole. before starting to use R. That book was reissued by CRC Press only a few years ago. It's *still* a pretty darned good intro to R. cut, pretty, and quantile

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Ashim Kapoor
Dear Gregg, This is what I meant :- > df1 Names 1John Good 2 Joe Jackson 3Bob A. Barker 4 John B. Good 5 Joe J. Jackson 6 Bob Allen Barker 7John Good 8 Joe Jack Johnson 9 Bob Barker > stringdist_left_join(df1,df1,by="Names",max_dist = 3)

Re: [R] How do I "teach" R that columns 1, 2, and 3 are the Year-Month-Day

2022-06-15 Thread Bert Gunter
Look again -- perhaps in your spam folder. Here's what he said: " Reprex: dta <- read.table( text = "Yr Mo Dy Fuel 2021 7 25 50.45 2021 8 27 61.48 2021 9 26 59.07 2021 11 4 55.40 2021 11 22 30.63 2021 11 26 41.35 2021 12 6 32.81 2022 1 14 49.86 2022 4 29 62.99 2022 6

Re: [R] Model Comparision for case control studies in R

2022-06-15 Thread anteneh asmare
Dear Tim, Thanks. the first vector y<-c(0,1,1,0,0,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1) is the disease status y= (1=Case,0=Control). The covariate age, smoking status and hypertension are independent(uncorrelated). The logistic regression (unconditional) will used. But I need to compare other models with

Re: [R] How do I "teach" R that columns 1, 2, and 3 are the Year-Month-Day

2022-06-15 Thread Gregory Coats via R-help
I do not see any posting on this topic from Jeff Newmiller. I seek a way to “teach” R that "2021-07-25” represents a Year, Month, and Day. Greg Coats > Fuel <- c(50.45, 61.48, 59.07, 55.40, 30.63, 41.35, 32.81, 49.86, 62.99, > 89.37) > plot (Fuel) > Dates <- c("2021-07-25", "2021-08-27", "2021-09

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Chris Evans
This isn't my expert area but I have at times encountered issues relating to it and I think this isn't "just" (as in "just standardize the similarly spelled duplicate names"). I once thought about trying to work out how many names I have in citations to my work. Over the years I have seen my name

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Gregg Powell via R-help
Hello Ashim and kind regards for you taking the time to answer back. > library(fuzzyjoin) > ?stringdist_left_join -this will join two tables, but what I am trying to do is just standardize the similarly spelled duplicate names in just the first column of a single table. I don't think fuzzyjoi

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Bert Gunter
As these are English names and appear to be present always as **first ?? last** (you didn't specify but that's how your example shows it), maybe something like the following might be a start: 1. Use strsplit() to split the names into their constituent parts. 2. Find the last *meaningful* part in e

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Ashim Kapoor
Dear Gregg, Check this out: library(fuzzyjoin) ?stringdist_left_join Best Regards, Ashim On Wed, Jun 15, 2022 at 8:28 PM Gregg Powell via R-help wrote: > > Have data sets where there are names, in the first column, client names in > the second, and Client start date in the third. > > There ar

Re: [R] Extracting only some coefficients for the logistic regression model and its plot

2022-06-15 Thread anteneh asmare
Dear Rui, Thanks it works! Best, Hana On 6/15/22, Rui Barradas wrote: > Hello, > > With ggplot it's easy, add color = id and coord_flip(). > > > ggplot(ORCI, aes(id, OR, color = id)) + >geom_point() + >geom_errorbar(aes(ymin = `2.5 %`, max = `97.5 %`)) + >coord_flip() + >theme_bw()

Re: [R] Extracting only some coefficients for the logistic regression model and its plot

2022-06-15 Thread anteneh asmare
Dear Rui, thanks a lot, dose it possible to have the horizontal line for scale OR value on Y axis and different color for entire box plots ? Best, Hana On 6/15/22, Rui Barradas wrote: > Hello, > > To extract all but the first 2 rows, use a negative index on the rows. > I will also coerce to data