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

2023-11-07 Thread Christopher Ryan via R-help
Hello. My question is in the subject line. Using R 4.1.3 on Windows 10. Commented MWE below. Thanks. --Chris Ryan library(dplyr) library(lattice) ## fabricate a dataframe dd <- data.frame(agency = sample(LETTERS, size = 5), total = sample(100:200, size = 5), las = sample(20:40, size = 5)) dd

[R] how to get paste() to output \% so LaTeX will interpret it as a percent sign rather than a comment symbol

2023-09-08 Thread Christopher Ryan via R-help
I'm using a .Rnw --> Sweave --> pdflatex workflow on Windows 10, with emacs 26.3 and ESS (not sure which version.) I have this code: n.tests.7 <- 3 ## for example trailing.7.pos.percent <- 12 ## for example trailing.7.message <- ifelse( n.tests.7 > 0, paste("In the past seven

[R] free copy of Harrell's Regression Modeling Strategies, first edition

2023-06-26 Thread Christopher Ryan via R-help
I have both the 1st and the 2nd edition of Frank Harrell's book. I'll send you the 1st edition if you cover the postage. (4th class book rate would probably not be all that expensive.) Let me know off-list, if interested. --Chris Ryan [[alternative HTML version deleted]]

[R] how to draw a stripplot in vertical orientation, using lattice

2023-05-19 Thread Christopher Ryan via R-help
I'm attempting to describe the height of a fall from a building, so the vertical orientation has a certain attraction. dd <- data.frame(nothing = rep(1:2, each = 6), height = runif(n=12, min=0, max=30)) dd ## pretty much what I'm looking for with(dd, stripchart(height, vertical = TRUE)) ## but

Re: [R] [External Email] Newbie: Controlling legends in graphs

2023-05-16 Thread Christopher Ryan via R-help
I"m more of a lattice guy than a ggplot guy, but perhaps this is part of the problem: . > geom_point(aes(y = m_K, color = "red")) + # >> you've > associated "K" with the color red > geom_smooth(aes(y = m_K, color = "red")) + > geom_point(aes(y = m_J, color = "blue")) +

Re: [R] [External Email] Requesting solution for R package

2023-04-24 Thread Christopher Ryan via R-help
I may not be understanding your question, or what you mean by "activate this package," but in general terms, packages must first be installed, with install.packages("thepackageIwant") And then, for any given R session in which you want to use that package: library(thepackageIwant) My apologies

Re: [R] [External Email] DOUBT

2023-03-21 Thread Christopher Ryan via R-help
Usually R provides a somewhat informative error message about where, exactly, it was surprised by something. Here, I suspect (not certain, without seeing the error message) that R was objecting to the space between HH and size. R cannot tell whether that represents two different variables where

Re: [R] [External Email] Re: R Certification

2023-01-04 Thread Christopher Ryan via R-help
Couldn't one just show prospective employers some impressive things one has done in R? Seems to me that would be more meaningful than any sort of certificate. --Chris Ryan On Wed, Jan 4, 2023 at 4:08 AM Mukesh Ghanshyamdas Lekhrajani via R-help wrote: > > Hey Rich, > > > > Out of all the help

Re: [R] [External Email] Pipe operator

2023-01-03 Thread Christopher Ryan via R-help
I think there are probably a number of purposes for (advantages to?) the pipe operator. One is that it can avoid nested operations: plot(mean(sqrt(c(1:10 ## this is my silly example code which can get difficult to read. This is arguably easier to read and understand: c(1:10) %>% sqrt()

Re: [R] [External Email] Re: increasing the width of dialog box generated by select.list()

2022-12-09 Thread Christopher Ryan via R-help
itle doesn't fit in the box title and is truncated, but it > appears beneath it in full in the box, and I can resize the box if I wish to. > > -- Bert > > > > On Fri, Dec 9, 2022 at 10:44 AM Christopher Ryan via R-help > wrote: >> >> You can see from the cod

[R] increasing the width of dialog box generated by select.list()

2022-12-09 Thread Christopher Ryan via R-help
You can see from the code below that the title of the dialog box is too long for the width of the selection box. How might I widen the box? Thanks. --Chris Ryan counties <- c("TIOGA", "BROOME", "ONTARIO", "ONONDAGA", "WESTCHESTER") chosen.county <- select.list(counties, preselect = NULL,