Re: [R] saving png images and X11

2022-02-26 Thread Jim Lemon
Hi Bogdan,
If we take the error message seriously, it may be that the initial X11
image was never displayed. When this very suspicious black box
function tried to transfer the image to a PNG file, it wasn't there or
the function couldn't find it.

Jim

On Sun, Feb 27, 2022 at 2:51 AM Bogdan Tanasa  wrote:
>
> Dear all,
>
> I am using a R package that renders the png images. As I am running the
> command below in a script, I would like to avoid the error below and still
> be able to save the images. How shall I do it ?
>
> > ChIPQCreport(SAMPLE, +  reportName = paste(ENTRY, "ChIPQC", 
> > sep="."), +  reportFolder = paste(ENTRY, "ChIPQCreport", 
> > sep="."))
> Saving 7 x 7 in image
> Error in png_dev(..., res = dpi, units = "in") : X11 is not available
>
> Shall I add the option :
>
> options(bitmapType='cairo')
>
> the png images are skipped and not saved on the disk. Thanks a lot,
>
> Bogdan
>
> [[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] error as in unused argument of a new package

2022-02-26 Thread Tariq Khasiri
I took care of the issue by simply updating an already installed package.
Really appreciate for the valuable feedback from R community. Glad to have
such kind guidelines.

On Sat, Feb 26, 2022 at 1:57 AM Ivan Krylov  wrote:

> On Fri, 25 Feb 2022 16:14:05 -0600
> Tariq Khasiri  wrote:
>
> > CS_never_cond <- did::att_gt(yname="lemp",
> >  tname="year",
> >  idname="countyreal",
> >  gname="first.treat",
> >  #xformla=~1,
> >  xformla = xformla,
> >  control_group="nevertreated",
> >  data = min_wage,
> >  panel = TRUE,
> >  base_period="universal", # <-- here
> >  bstrap = TRUE,
> >  cband = TRUE)
>
> > Error in did::att_gt(yname = "lemp", tname = "year", idname =
> > "countyreal",  :
> >  unused argument (base_period = "universal")
>
> Does ?did::att_gt specify that the att_gt function accepts an
> argument named "base_period" (marked by me with "# <-- here")?
> If it does, it's a documentation error, contact maintainer('did') and
> tell them about it. If it doesn't, you need to adjust your call to
> did::att_gt to provide the correct arguments.
>
> --
> Best regards,
> Ivan
>

[[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-es] Porcentajes de clasificaciones correctas

2022-02-26 Thread Manuel Mendoza
Gracias Juan Carlos, aunque yo estaba equivocado, puesto que diag(tabrp) te
da la diagonal de la matriz completa.
Un saludo.

El sáb, 26 feb 2022 a las 16:09, Juan Carlos Lopez Mesa (<
jclop...@unal.edu.co>) escribió:

> Hola
>
> El paquete metrics te puede servir, en particular la función  accuracy
>
> library(Metrics)
>
> accuracy(actual, predicted)
>
> Saludos
>
> El sáb, 26 feb 2022 a las 1:19, Manuel Mendoza (<
> mmend...@fulbrightmail.org>) escribió:
>
>> Buenos días, obtengo una Tabla de contingencia con:
>> tabrp<-table(variable objetivo, predicción)
>>
>> y en porcentajes con:
>> tabprc<-100*(prop.table(tabrp,1))
>>
>> Para sacar los porcentajes de clasificaciones correctas usaba simplemente:
>> diag(tabrp)
>>
>> pero si no todas las categorías de la variable objetivo están en la
>> predicción, la diagonal ya no son las clasificaciones correctas.
>>
>> ¿Sabéis de alguna forma sencilla de obtener esas clasificaciones correctas
>> o de algún paquete que te lo dé directamente?
>> Gracias,
>> Manuel
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> R-help-es mailing list
>> R-help-es@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-help-es
>>
>
> *Aviso legal:* El contenido de este mensaje y los archivos adjuntos son
> confidenciales y de uso exclusivo de la Universidad Nacional de Colombia.
> Se encuentran dirigidos sólo para el uso del destinatario al cual van
> enviados. La reproducción, lectura y/o copia se encuentran prohibidas a
> cualquier persona diferente a este y puede ser ilegal. Si usted lo ha
> recibido por error, infórmenos y elimínelo de su correo. Los Datos
> Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra
> Política de Datos Personales que podrá consultar en la página web
> www.unal.edu.co. Las opiniones, informaciones, conclusiones y cualquier
> otro tipo de dato contenido en este correo electrónico, no relacionados con
> la actividad de la Universidad Nacional de Colombia, se entenderá como
> personales y de ninguna manera son avaladas por la Universidad.
>

[[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] saving png images and X11

2022-02-26 Thread Ivan Krylov
On Fri, 25 Feb 2022 04:33:38 -0800
Bogdan Tanasa  wrote:

> Error in png_dev(..., res = dpi, units = "in") : X11 is not available
> 
> Shall I add the option :
> 
> options(bitmapType='cairo')
> 
> the png images are skipped and not saved on the disk.

Is this a question or a statement that png('file.png', type = 'cairo');
plot(1,1); dev.off() doesn't produce any files for you?

What's the output of capabilities() and sessionInfo() in this build of
R?

>   [[alternative HTML version deleted]]

P.S. Please compose your messages in plain text. Since this mailing
list strips the HTML parts of your messages, we only get the plain text
part automatically produced by your mailer, some of it mangled quite a
bit.

-- 
Best regards,
Ivan

__
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] arrow keys in R

2022-02-26 Thread Ivan Krylov
On Thu, 24 Feb 2022 16:14:49 -0800
Bogdan Tanasa  wrote:

> On one hand, the symbols ^[[A^[[A^[[A appear;

> On the other hand, shall I start typing a command, such as "library",
> I begin by typing the first 2 letters "li", click "left arrow", and
> the result is "li "(i.e. lots of spaces) instead of having the command
> "library" written on the screen.

Did you mean Tab here? I.e. you type "libr", you press Tab, and R
autocompletes that to "library".

Sounds like readline and/or terminal problems. How was R compiled and
installed on this system? What terminal are you running R in, and is the
$TERM variable set correctly? Does the target system have the correct
termcap definitions for this terminal?

Perhaps https://cran.r-project.org/doc/manuals/r-release/R-admin.html
could be of some help to you.

-- 
Best regards,
Ivan

__
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] saving png images and X11

2022-02-26 Thread Jeff Newmiller
This is rather OS-dependent. You should read [1] and if if you need more help 
consider asking in one of the OS-specific mailing lists mentioned in the 
Posting Guide.

https://cran.r-project.org/doc/manuals/r-release/R-admin.html

On February 25, 2022 4:33:38 AM PST, Bogdan Tanasa  wrote:
>Dear all,
>
>I am using a R package that renders the png images. As I am running the
>command below in a script, I would like to avoid the error below and still
>be able to save the images. How shall I do it ?
>
>> ChIPQCreport(SAMPLE, +  reportName = paste(ENTRY, "ChIPQC", 
>> sep="."), +  reportFolder = paste(ENTRY, "ChIPQCreport", 
>> sep="."))
>Saving 7 x 7 in image
>Error in png_dev(..., res = dpi, units = "in") : X11 is not available
>
>Shall I add the option :
>
>options(bitmapType='cairo')
>
>the png images are skipped and not saved on the disk. Thanks a lot,
>
>Bogdan
>
>   [[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.

-- 
Sent from my phone. Please excuse my brevity.

__
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] arrow keys in R

2022-02-26 Thread Jeff Newmiller
Can you provide the output of sessionInfo()? And are you connected remotely?

On February 24, 2022 4:14:49 PM PST, Bogdan Tanasa  wrote:
>In R, I do press the arrow keys, and 2 things happen :
>
>On one hand, the symbols ^[[A^[[A^[[A appear;
>
>On the other hand, shall I start typing a command, such as "library", I
>begin by typing the first 2 letters "li", click "left arrow", and the
>result is "li "(i.e. lots of spaces) instead of having the command
>"library" written on the screen.
>
>Is there any way to fix it please ? Thanks,
>
>Bogdan
>
>   [[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.

-- 
Sent from my phone. Please excuse my brevity.

__
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] arrow keys in R

2022-02-26 Thread Bogdan Tanasa
In R, I do press the arrow keys, and 2 things happen :

On one hand, the symbols ^[[A^[[A^[[A appear;

On the other hand, shall I start typing a command, such as "library", I
begin by typing the first 2 letters "li", click "left arrow", and the
result is "li "(i.e. lots of spaces) instead of having the command
"library" written on the screen.

Is there any way to fix it please ? Thanks,

Bogdan

[[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.