Re: [R] Is there a sexy way ...?

2024-09-27 Thread Chris Evans via R-help
Oh glorious!  Thanks Duncan. Fortune cookie nomination! On 27/09/2024 11:13, Duncan Murdoch wrote: On 2024-09-26 11:55 p.m., Rolf Turner wrote: I have (toy example): x <- list(`1` = c(7, 13, 1, 4, 10),    `2` = c(2, 5,  14, 8, 11),    `3` = c(6, 9, 15, 12, 3)) and f <- facto

Re: [R] boxplot notch

2024-08-16 Thread Chris Evans via R-help
That's not really a reprex Sibylle.  I did try to use it to see if I could work out what you were trying to do and help but there is so much in there that I suspect is distraction from the notch issue and its error message. Please can you give us something stripped of all unecessary things and

Re: [R] How to Reformat a dataframe

2023-10-28 Thread Chris Evans via R-help
The tidyverse idiom looks very different but does what you want and I have come to like it. What idiom of R one likes, for the mostly small datasets I handle, is largely a matter of preferenceds for "readability", itself very personal. Here's my tidyverse way of doing what you wanted: ### sta

Re: [R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-07 Thread Chris Evans via R-help
esn't the outcome of this suggestion still depend on which fonts and output device you are using? ... and that is to some degree still system dependent... On October 6, 2023 7:50:00 AM PDT, Rui Barradas wrote: Às 10:09 de 06/10/2023, Chris Evans via R-help escreveu: The reason I am aski

Re: [R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-06 Thread Chris Evans via R-help
Thanks again Jan.  That is lovely and clean and I probably should have seen that option. I had anxieties about the portability of using text.  (The function will end up in my https://github.com/cpsyctc/CECPfuns package so I'd like it to be fairly immune to character sets and different platfor

Re: [R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-06 Thread Chris Evans via R-help
    "Improved")) +   scale_fill_manual(name = "Change",    values = c("A" = "red",   "B" = "grey",           "C" = "green"),   

[R] Is it possible to get a downward pointing solid triangle plotting symbol in R?

2023-10-06 Thread Chris Evans via R-help
The reason I am asking is that I would like to mark areas on a plot using geom_polygon() and aes(fill = variable) to fill various polygons forming the background of a plot with different colours. Then I would like to overlay that with points representing direction of change: improved, no reliab

Re: [R] Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" from rmarkdown

2023-08-25 Thread Chris Evans via R-help
ed to get back to my main work (and work I'm more competent to do!) Many thanks again, Chris On 25/08/2023 15:48, Ivan Krylov wrote: В Fri, 25 Aug 2023 11:49:03 +0200 Chris Evans via R-help пишет: Hm.  I tried that butI really don't know what to make of what it's telling m

Re: [R] Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" from rmarkdown

2023-08-25 Thread Chris Evans via R-help
On 24/08/2023 21:05, Duncan Murdoch wrote: On 24/08/2023 1:58 p.m., Chris Evans via R-help wrote: I have an Rmarkdown file which is part of my distill "Rblog" (https://www.psyctc.org/Rblog/).  It was knitting fine until last week, now knitting terminates with this: Rscript -e

Re: [R] Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" from rmarkdown

2023-08-25 Thread Chris Evans via R-help
Thanks Duncan.  I've pushed the whole collection to: https://github.com/cpsyctc/Rblog On 24/08/2023 20:54, Duncan Murdoch wrote: Could you post a link to the source for that Rmd file? Duncan Murdoch [rest snipped] __ R-help@r-project.org mailing l

[R] Error "STRING_ELT() can only be applied to a 'character vector', not a 'list'" from rmarkdown

2023-08-24 Thread Chris Evans via R-help
I have an Rmarkdown file which is part of my distill "Rblog" (https://www.psyctc.org/Rblog/).  It was knitting fine until last week, now knitting terminates with this: Rscript -e 'rmarkdown::render("creating-a-shiny-server.Rmd")' processing file: creating-a-shiny-server.Rmd output file: creat

[R] Puzzled by results from base::rank()

2023-08-11 Thread Chris Evans via R-help
I understand that the default ties.method is "average".  Here is what I get, expanding a bit on the help page example. Running R 4.3.1 on Ubuntu 22.04.2. > x2 <- c(3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5) > rank(x2)  [1]  4.5  1.5  6.0  1.5  8.0 11.0  3.0 10.0  8.0  4.5  8.0 OK so the ties, each of wi

Re: [R] How to plot both lines and points by group on ggplot2

2023-07-01 Thread Chris Evans via R-help
[Whoops, forgot that default reply-to is to the sender.] On 01/07/2023 19:20, Luigi Marongiu wrote: Hello, I have a dataframe with measurements stratified by the concentration of a certain substance. I would like to plot the points of the measures and connect the points within each series of co

Re: [R] Help with regex replacements

2023-06-27 Thread Chris Evans via R-help
9 AM Bert Gunter wrote: Does this do it for you (or get you closer):  gsub("\\[.*\\]|[] |/ ","",tmp$Text) [1] "Я досяг того, чого хотів" [2] "Мені вдалося\nзробити бажане" [3] "Я досяг (досягла) того, чого хотів (хотіла)&quo

Re: [R] Help with regex replacements

2023-06-27 Thread Chris Evans via R-help
ologies if this is trivial but I'd hate to have to clean these hundreds of lines by hand though it's starting to look as if I'd achieve that faster by hand than I will by banging my ignorance of R regexp syntax on the problem. TIA, Chris -Original Message- From: R

[R] Help with regex replacements

2023-06-27 Thread Chris Evans via R-help
I am sure this is easy for people who are good at regexps but I'm failing with it.  The situation is that I have hundreds of lines of Ukrainian translations of some English. They contain things like this: 1"Я досяг того, чого хотів"2"Мені вдалося зробити бажане"3"Я досяг (досягла) того, чого х

Re: [R] Asking about R "Security" ..

2023-05-17 Thread Chris Evans via R-help
Fortune nomination (if trimmed a little) ... thanks to Martin, Ivan and so many others who never cease to teach me things here! (As an ex-NHS person who has used R for countless centuries, slowly less awfully courtesy of this list and other angeles, I contacted Ms Majid off list to see if I can

Re: [R] Reg: Help regarding ggplot2

2023-05-02 Thread Chris Evans via R-help
need to spend some >> days working on your understanding of R, ggplot and the tidyverse realm of >> R. You can use ggplot() without using much of the tidyverse but they are >> designed to complement each other and the more I understand of the tidyverse >> way of doin

Re: [R] Reg: Help regarding ggplot2

2023-05-02 Thread Chris Evans via R-help
It's not clear what you want but ... On 02/05/2023 10:57, Upananda Pani wrote: > Dear All, > > I have a dataset which contains date and 12 other countries data. I > have extracted the data as xts object. > > I am not able to recall all the series in the Y axis. My data set > looks like this > > in