Re: [R] [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-09-23 Thread Uwe Ligges
Note that the issues with the Rscript editor have been fixed in 
R-patched and R-devel.


Best,
Uwe Ligges


On 22.09.2022 23:08, Andrew Hart via R-help wrote:

On 22/09/2022 16:42, Toby Hocking wrote:
Another option is to use https://emacspeak.sourceforge.net/ 
 (version of emacs editor/ide 
which can speak letters/words/lines -- has a blind maintainer) with 
https://ess.r-project.org/  (interface for 
editing and running R code from within emacs)


Thanks everyone for all the suggestions. Of course, the optimal solution 
would be to figure out what is going on in Rgui, but, as is always the 
case, the blind user use case is a fairly niche one. I appreciate all 
the suggestions for finding an immediate solution to my problem.
I don't use any kind of IDE for working with R since I simply haven't 
found one that is accessible or that i understand how to use. There is a 
plug-in for the Eclipse IDE I installed a few years ago, but I didn't 
understand the first thing about how it was to be used. So I've just 
always worked with an editor open in one Window and R in another,
working interactively in R or bouncing over to the editor for more 
complex things and sourcing code into R as necessary. However, I only 
use the R console in Rgui. I went and had a look at Rterm, which I have 
never used on Windows; I've only ever used it when ssh-ing into Linux 
systems to use R. However, I've just found out that Rterm does a number 
of fairly important things that probably mean I can just use it instead 
of Rgui:

1. You can paste from the clipboard into the Rterm prompt;
2. It has a command history;
3. If you plot something, it opens a Window to draw the plot (I never 
realised it could do this and had always assumed Rgui was needed for 
this); and
4. It opens the HTML help if you ask for help on windows. I only ever 
saw it display text help on Linux, but I was logged in remotely. 
Text-based help is fine when ssh-ing into a machine, but HTML help is 
much nicer to read and navigate.


I think I'll just switch over to Rterm for a while, but I can also check 
out ess, which I wasn't aware of.


Thanks a lot,
Andrew.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Need help plotting

2022-09-23 Thread Jim Lemon
Hi David,
No, read.table converts a text representation of data into a data frame object.

Jim

On Sat, Sep 24, 2022 at 2:29 AM DFP  wrote:
>
> Do I need that read.table if the tst dataframe already exists in my
> system?  If so, why?
>
> --
>
> Hello,
>
> You have to load the packages involved:
>
>
> library(dplyr)
> library(tidyr)
> library(ggplot2)
>
>
> then run the full sequence. Though this is not important, if you are
> pivotting columnns named y1 and y2, why not name the result just y?
>
>
> pivot_longer(-time, names_to = "y")
>
>
> And here is complete code, runs in a fresh R session.
>
>
> tst  <- read.table(text = "
> time y1 y2
> 1  18:55 30 19
> 2  18:56 30 19
> 3  18:57 29 19
> 4  18:58 31 19
> 5  18:59 28 19
> 6  19:00 28 19
> 7  19:01 28 19
> 8  19:02 28 19
> 9  19:03 28 19
> 10 19:04 28 19
> 11 19:05 29 19
> ", header = TRUE)
>
> library(dplyr)
> library(tidyr)
> library(ggplot2)
>
> tst %>%
> mutate(time = paste(Sys.Date(), time),
>time = as.POSIXct(time)) %>%
> select(time, y1, y2) %>%
> # reshape to long format
> pivot_longer(-time, names_to = "y") %>%
> # now plot
> ggplot(aes(time, value, color = y)) +
> geom_line() +
> geom_point() +
> scale_color_manual(values = c("orange", "skyblue")) +
> # make datetime labels
> scale_x_datetime(date_breaks = "1 mins", date_labels = "%H:%M") +
> theme_bw()
>
>
> Hope this helps,
>
> Rui Barradas
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to set default encoding for sourced files

2022-09-23 Thread Andrew Hart via R-help
Thanks. The --encoding option indeed makes it all work. Rscript --help 
does not show the --encoding option in the list of options.


And yes, you are right. I was using R 4.1.2 when I first wrote to the 
list. I was experiencing a technical  issue with R 4.2.1 which was 
preventing me from switching over to it but I have a satisfactory 
solution to the problem now and have just moved to R 4.2.1. It seems 
that, on Windows at least, R 4.2.1 does indeed use utf-8 as its native 
encoding. I didn't realise this. At any rate, it looks like merely 
upgrading solves my encoding concerns without the need to set options or 
specify the encoding with Rscript. Very nice and kudos to the R 
developers for taking the leap!


Thanks everyone for your help.

Cheers,
Andrew.


On 21/09/2022 16:40, Andrew Simmons wrote:
If you're running it from Rscript, you'll have to specify the encoding 
like this:


Rscript --encoding UTF-8 file

If you're using R for Windows, I'm surprised this issue would come up 
since R 4.2.0 added support for UTF-8. At least on my own Windows 
machine, I can run exactly what you wrote and not have any issues. Are 
you using an older version of R?



On Wed., Sep. 21, 2022, 14:20 Andrew Hart via R-help, 
mailto:r-help@r-project.org>> wrote:


On 21/09/2022 11:46, Bert Gunter wrote:
 > ?options
 >
 > options(encoding = "utf-8")
 > in a startup file or function should presumably do it. See ?Startup
 >
 > Bert

Thanks everyone. Setting encoding in options in Rprofile.site has taken
care of it.

Curiously, it doesn't seem to solve the whole problem for Rscript
though. I checked that Rscript is indeed picking up the default
encoding
from options, but it's complaining about seeing an unexpected input in
dat$línea <- 
immediately following the l when I run
Rscript myfile.R.
So, it would appear that Rscript is not using source to read in the R
script. Mind you, if I do
Rscript -e source('myfile.R')
it works properly just like in Rgui.

Once again, Thanks heaps.

Cheers,
Andrew.

__
R-help@r-project.org  mailing list --
To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help

PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Arguments to utils:::menuInstallPkgs

2022-09-23 Thread Dessye Belay



Sent from Mail for Windows 10


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Need help plotting

2022-09-23 Thread DFP
Do I need that read.table if the tst dataframe already exists in my 
system?  If so, why?

--

Hello,

You have to load the packages involved:


library(dplyr)
library(tidyr)
library(ggplot2)


then run the full sequence. Though this is not important, if you are
pivotting columnns named y1 and y2, why not name the result just y?


pivot_longer(-time, names_to = "y")


And here is complete code, runs in a fresh R session.


tst  <- read.table(text = "
time y1 y2
1  18:55 30 19
2  18:56 30 19
3  18:57 29 19
4  18:58 31 19
5  18:59 28 19
6  19:00 28 19
7  19:01 28 19
8  19:02 28 19
9  19:03 28 19
10 19:04 28 19
11 19:05 29 19
", header = TRUE)

library(dplyr)
library(tidyr)
library(ggplot2)

tst %>%
    mutate(time = paste(Sys.Date(), time),
   time = as.POSIXct(time)) %>%
    select(time, y1, y2) %>%
    # reshape to long format
    pivot_longer(-time, names_to = "y") %>%
    # now plot
    ggplot(aes(time, value, color = y)) +
    geom_line() +
    geom_point() +
    scale_color_manual(values = c("orange", "skyblue")) +
    # make datetime labels
    scale_x_datetime(date_breaks = "1 mins", date_labels = "%H:%M") +
    theme_bw()


Hope this helps,

Rui Barradas

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-09-23 Thread Andrew Hart via R-help

On 22/09/2022 16:42, Toby Hocking wrote:
Another option is to use https://emacspeak.sourceforge.net/ 
 (version of emacs editor/ide which 
can speak letters/words/lines -- has a blind maintainer) with 
https://ess.r-project.org/  (interface for 
editing and running R code from within emacs)


Thanks everyone for all the suggestions. Of course, the optimal solution 
would be to figure out what is going on in Rgui, but, as is always the 
case, the blind user use case is a fairly niche one. I appreciate all 
the suggestions for finding an immediate solution to my problem.
I don't use any kind of IDE for working with R since I simply haven't 
found one that is accessible or that i understand how to use. There is a 
plug-in for the Eclipse IDE I installed a few years ago, but I didn't 
understand the first thing about how it was to be used. So I've just 
always worked with an editor open in one Window and R in another,
working interactively in R or bouncing over to the editor for more 
complex things and sourcing code into R as necessary. However, I only 
use the R console in Rgui. I went and had a look at Rterm, which I have 
never used on Windows; I've only ever used it when ssh-ing into Linux 
systems to use R. However, I've just found out that Rterm does a number 
of fairly important things that probably mean I can just use it instead 
of Rgui:

1. You can paste from the clipboard into the Rterm prompt;
2. It has a command history;
3. If you plot something, it opens a Window to draw the plot (I never 
realised it could do this and had always assumed Rgui was needed for 
this); and
4. It opens the HTML help if you ask for help on windows. I only ever 
saw it display text help on Linux, but I was logged in remotely. 
Text-based help is fine when ssh-ing into a machine, but HTML help is 
much nicer to read and navigate.


I think I'll just switch over to Rterm for a while, but I can also check 
out ess, which I wasn't aware of.


Thanks a lot,
Andrew.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R-es] RMD

2022-09-23 Thread Jorge I Velez
Hola José,

Has intentado agregando

lang: "es-ES"

en el YAML?

Espero sea de utilidad.

Saludos,
Jorge.-


On Thu, Sep 22, 2022 at 5:53 AM Jose Betancourt Bethencourt <
betans...@gmail.com> wrote:

> Estimados cuando hago un Rmd , al salir en html los acentos no salen
> sino otros signos no deseados. ?Como puedo evitar eso?
>
> saludos
> --
> Dr. Jose A. Betancourt Bethencourt
> Universidad de Ciencias Medicas Carlos j. Finlay
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] RMD

2022-09-23 Thread Jose Betancourt Bethencourt
Gracias

El 22/9/22, Javier Nieto  escribió:
> Hola,
>
> Si usas Windows, el encoding no es UTF8 por default y lo que generes con el
> paquete Rknit sí se genera en UTF8. Cambia tu archivo de código a UTF8.
>
>
> Saludos
> 
> De: R-help-es  en nombre de Javier Marcuzzi
> 
> Enviado: jueves, 22 de septiembre de 2022 06:34 a. m.
> Para: betans...@gmail.com 
> CC: R-help-es@r-project.org 
> Asunto: Re: [R-es] RMD
>
> Estimado Jose
>
> Cuando guardas el archivo, ¿está codificado en UTF8?
>
> Javier Marcuzzi
>
>> El 22 sep. 2022, a las 07:53, Jose Betancourt Bethencourt
>>  escribió:
>>
>> Estimados cuando hago un Rmd , al salir en html los acentos no salen
>> sino otros signos no deseados. ?Como puedo evitar eso?
>>
>> saludos
>> --
>> Dr. Jose A. Betancourt Bethencourt
>> Universidad de Ciencias Medicas Carlos j. Finlay
>>
>> ___
>> R-help-es mailing list
>> R-help-es@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>


-- 
Dr. Jose A. Betancourt Bethencourt
Universidad de Ciencias Medicas Carlos j. Finlay

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R-es] Grupo de Usuarios de R de Madrid - Jueves 29 de septiembre (presencial/online).

2022-09-23 Thread Juan Abasolo

Qué bueno, Carlos, que lo hagan on line.

A mí me resulta imposible conectarme en esas fechas y horarios, espero 
que puedan subir esta reunion a Vimeo y que la podamos disfrutar en 
diferido los que no lleguemos.


Juan

22/9/22 17:39(e)an, Carlos Ortega igorleak idatzi zuen:

Hola,

El jueves 29 de septiembre, celebraremos la siguiente reunión del "Grupo de
R de Madrid".

En esta ocasión contaremos con Rasana Ferrero, directora académica de
"Máxima Formación" que nos hablará de:

*"Consejos para comenzar tu carrera de ciencia de datos con R".*

Más detalles de la sesión aquí:

https://www.meetup.com/es-ES/grupo-de-usuarios-de-r-de-madrid/events/288647594/

Gracias,
Carlos.

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


--
Juan Abasolo, PhD

EUDIA ikerketa taldea | Hizkuntzaren eta Literaturaren Didaktika Saila
Bilboko Hezkuntza Fakultatea, Euskal Herriko Unibertsitatea UPV/EHU

Sarriena auzoa z/g 48940 - Leioa (Bizkaia)

T   : (+34) 94 601 7567
Telegram: @JuanAbasolo
Skype   : abasolo72
Bloga   : juanabasolo.netlify.com

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es