Re: [R] Network issue

2024-02-21 Thread James Powell
Hi Stephen, Thanks very much for getting back to me. My problem is described below. Any help would be greatly appreciated. Thanks, James Hi, Sorry for bothering you because I know that your time is voluntary, but I would really appreciate some help. I work in a hospital in part of Ireland’s

Re: [R] Network issue

2024-02-21 Thread James Powell
Hi Ivan, Thanks very much for your response, I'll definitely give that a go. Best wishes, James -Original Message- From: Ivan Krylov Sent: Wednesday 21 February 2024 10:38 To: James Powell Cc: r-help@r-project.org Subject: Re: [R] Network issue CAUTION: This email originated from

Re: [R] Network issue

2024-02-21 Thread Ivan Krylov via R-help
В Wed, 21 Feb 2024 06:09:51 + James Powell пишет: > This was working fine until yesterday when I had error messages > trying to install some packages. See enclosed “S2” for example. It > looks like it is trying to download a file as part of the > installation, but of course can’t. Since

Re: [R] Network issue

2024-02-21 Thread James Powell
Hi Stephen, I didn’t see this suggested previously, but yes I have made repeated attempts to gain access to CRAN via R but to no avail. Mirroring CRAN is a really good idea, but I’m not sure how to get R to recognise the local file locations when the installation files seek access to CRAN via

Re: [R] Network issue

2024-02-21 Thread Petr Pikal
Hallo James Just a wild guess, are your problems connected with change of default download method from wininet to libcurl? Cheers Petr út 20. 2. 2024 v 18:24 odesílatel James Powell napsal: > [[alternative HTML version deleted]] __

Re: [R] Help

2024-02-20 Thread Jeff Newmiller via R-help
Regarding 1 and 2, please read the Posting Guide mentioned at the bottom of every R-help post. R does not equal statistics... and education about statistics is way too ambitious to include in this mailing list that is about a tool that happens to be useful for statisticians. There are forums

Re: [R] Help

2024-02-20 Thread Rolf Turner
On Mon, 19 Feb 2024 17:39:23 +0100 Lisa Hupfer via R-help wrote: > I am writing my master thesis in which I compared two cultures . So > for my statistics I need to compare Age,Sex,Culture as well as have a > look at the tasks scores . > > Anyone familiar with this ? > I’d love to share my

Re: [R] Network issue

2024-02-20 Thread Jeff Newmiller via R-help
... and if the problem is networking, then you will likely need help from someone who knows your local configuration. Employers often do things that limit what R can do, and none of us are likely to know about those things. On February 20, 2024 11:43:24 AM PST, stephen sefick wrote: >Maybe I

Re: [R] Network issue

2024-02-20 Thread stephen sefick
Maybe I missed the rest of the post? You are more likely to get help with your problems if you create a minimal reproducible example. Kindest regards, Stephen Sefick On Tue, Feb 20, 2024, 12:24 James Powell wrote: > [[alternative HTML version deleted]]

Re: [R] Including an external set of coded

2024-02-20 Thread CALUM POLWART
What happens if you add a line to the code in lines 1-5. So line 5 is now line 6 etc? Your "procedure" needs a name So either it's a function, OR, we each procedure is a file to source? On Tue, 20 Feb 2024, 16:55 Steven Yen, wrote: > I see——still put those lines in a procedure and call the

[R] Help

2024-02-20 Thread Lisa Hupfer via R-help
I am writing my master thesis in which I compared two cultures . So for my statistics I need to compare Age,Sex,Culture as well as have a look at the tasks scores . Anyone familiar with this ? I’d love to share my script so you guide me where I did wrong . Regards

[R] Network issue

2024-02-20 Thread James Powell
R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or

Re: [R] Including an external set of coded

2024-02-20 Thread CALUM POLWART
Are you asking to source lines 5-10 of a file for instance? Never seen that done in R. Feels a dodgy thing to do as changing line will screw things up. On the other hand - I'd often have functions in a file called perhaps "functions.R" and source("functions.R") Then I can call an individual

Re: [R] Including an external set of coded

2024-02-20 Thread Bert Gunter
I believe you will have to expain what you want more fully, as what you requested appears to be exactly what source() does, to me anyway. Please reread its help file more carefully perhaps? -- Bert On Tue, Feb 20, 2024 at 7:36 AM Steven Yen wrote: > How can I call and include an external set

[R] Including an external set of coded

2024-02-20 Thread Steven Yen
How can I call and include an external set of R codes, not necessarily a complete procedure (which can be include with a “source” command). Example: #I like to include and run the following lines residing in a file outside the main program: mydata<-transform(mydata, a<-b+c d<-e+f } Steven

Re: [R] Looping

2024-02-20 Thread Steven Yen
Steven from iPhone > On Feb 19, 2024, at 4:56 PM, Steven Yen wrote: > > Thanks to all. Glad there are many options. > > Steven from iPhone > >>> On Feb 19, 2024, at 1:55 PM, Rui Barradas wrote: >>> >> Às 03:27 de 19/02/2024, Steven Yen escreveu: >>> I need to read csv files repeatedly,

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-19 Thread peter dalgaard
Is it possible that there is a version skew between binaries and source packages? If you try the RStudio Update option, which versions does it claim that you have installed? If it is the same versions that you download, then no wonder that the update doesn't change anything. E.g. I see that

Re: [ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-19 Thread Sparapani, Rodney via ESS-help
Hi Dirk: Glad you resolved it with the help of others here at ESS-help. FWIW, both of these should be exactly the same version. Martin committed the fix on 01/31 and triggered the ELPA version 24.01.1. Theoretically, we could move to a MMDD.micro naming convention for ESS. However, we have

Re: [R] Capturing Function Arguments

2024-02-19 Thread Reed A. Cartwright
Thanks Ivan and Iris for your solutions, I'll look over them. The solution that I came up with last night involves creating a function that has the same formals signature as the wrapped function and relying on `environment()` and `list(...)` to return a function's variables at the beginning of

Re: [R] Looping

2024-02-19 Thread Marc Girondot via R-help
In my package HelpersMG, I have included a function to read in one time all the files of a folder and they are stored in a list: read_folder(   folder = try(file.choose(), silent = TRUE),   file = NULL,   wildcard = "*.*",   read = read.delim,   ... ) In your case, for example:

Re: [R] Looping

2024-02-18 Thread Rui Barradas
Às 03:27 de 19/02/2024, Steven Yen escreveu: I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv, 24 altogether. That is, data<-read.csv(“data1.csv”) … data<-read.csv(“data24.csv”) … Is there a way to do this in a loop? Thank you. Steven from iPhone

Re: [R] Looping

2024-02-18 Thread Richard O'Keefe
f <- function (filename) { data<- read.csv(filename) .. } for (filename in paste0("data", 1:24, ".csv")) f(filename) Depending on what exactly you have in your file system, for (filename in system("ls data*.csv", TRUE)) f(filename) might work. On Mon, 19 Feb 2024 at 16:33, Steven Yen

Re: [R] Looping

2024-02-18 Thread avi.e.gross
Steven, It depends what you want to do. What you are showing seems to replace the values stored in "data" each time. Many kinds of loops will do that, with one simple way being to store all the filenames in a list and loop on the contents of the list as arguments to read.csv. Since you show

Re: [ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-18 Thread Dirk Eddelbuettel via ESS-help
On 18 February 2024 at 20:54, Brett Presnell via ESS-help wrote: | | Forgot to mention that you may need to uninstall and reinstall the ess | package after putting the :pin in place, but I'm not sure about that. | Restarting emacs is maybe needed too, but not sure about that either. The pin,

Re: [R] Looping

2024-02-18 Thread Peter Langfelder
Try for (ind in 1:24) { data = read.csv(paste0("data", ind, ".csv")) ... } Peter On Mon, Feb 19, 2024 at 11:33 AM Steven Yen wrote: > > I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv, > 24 altogether. That is, > > data<-read.csv(“data1.csv”) > … >

[R] Looping

2024-02-18 Thread Steven Yen
I need to read csv files repeatedly, named data1.csv, data2.csv,… data24.csv, 24 altogether. That is, data<-read.csv(“data1.csv”) … data<-read.csv(“data24.csv”) … Is there a way to do this in a loop? Thank you. Steven from iPhone [[alternative HTML version deleted]]

Re: [ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-18 Thread Brett Presnell via ESS-help
Forgot to mention that you may need to uninstall and reinstall the ess package after putting the :pin in place, but I'm not sure about that. Restarting emacs is maybe needed too, but not sure about that either. __ ESS-help@r-project.org mailing list

Re: [ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-18 Thread Brett Presnell via ESS-help
Hi Dirk. If you use use-package, you can pin the package source for ess to gnu-elpa like this: (use-package ess :ensure t :pin gnu) Documentation for use-package can be found here: https://www.gnu.org/software/emacs/manual/html_node/use-package/index.html Section 5.2 discusses :pin.

Re: [ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-18 Thread Dirk Eddelbuettel via ESS-help
Rodney et al, Thanks for the update(s)! Alas, I also seem to see ess20240131.1041 installed Emacs Speaks Statistics which seems to win over ess24.1.1 obsolete Emacs Speaks Statistics What is the

Re: [R] Capturing Function Arguments

2024-02-18 Thread Ivan Krylov via R-help
В Sat, 17 Feb 2024 11:15:43 -0700 "Reed A. Cartwright" пишет: > I'm wrapping a function in R and I want to record all the arguments > passed to it, including default values and missing values. This is hard if not impossible to implement for the general case because the default arguments are

Re: [R] Capturing Function Arguments

2024-02-18 Thread Iris Simmons
Hi Reed, I need to stress before giving my answer that no solution can handle everything. These scenarios will always lead to problems: * if any of the formal arguments rely on the current state of the call stack * if any of the formal arguments rely on a variable that is only defined later in

[R] Capturing Function Arguments

2024-02-18 Thread Reed A. Cartwright
I'm wrapping a function in R and I want to record all the arguments passed to it, including default values and missing values. I want to be able to snoop on function calls in sourced scripts as part of a unit testing framework. I can capture the values fine, but I'm having trouble evaluating them

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-17 Thread Berwin A Turlach
G'day Philipp, On Fri, 16 Feb 2024 17:33:13 +0100 Philipp Schneider wrote: > Thanks for all the input. It's happening again. This time for the > packages "DBI", "parallelly", "segmented", "survival", "V8". So, > RStudio shows updates for those and updating them via RStudio leads > to this

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-16 Thread gernophil--- via R-help
Hey everyone, Thanks for all the input. It's happening again. This time for the packages "DBI", "parallelly", "segmented", "survival", "V8". So, RStudio shows updates for those and updating them via RStudio leads to this output: ``` > install.packages(c("DBI", "parallelly", "segmented",

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-16 Thread Duncan Murdoch
The normal way to update packages is to use update.packages() rather than install.packages(). Likely the problem you're having is from using install.packages() (or RStudio using it). I normally use update.packages(ask=FALSE), but if you want to pick and choose, you could use the default which

[R] [Rd] R 4.3.3 scheduled for February 29

2024-02-16 Thread Peter Dalgaard via R-help
Full schedule available on developer.r-project.org in a short while. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [R] VPAT OR Accessibility Conformance Report Request (Zachary Benner)

2024-02-16 Thread Richard Sherman
Dear Zachary, People will rightly point you to: this article: https://journal.r-project.org/archive/2013-1/godfrey.pdf and this book chapter: https://r-resources.massey.ac.nz/BrailleRInAction/WorkingBlind.html There is additional information elsewhere, for example here:

[R] VPAT OR Accessibility Conformance Report Request

2024-02-16 Thread Zachary Benner
To Whom It May Concern, My name is Zach Benner and I am the Accessibility (A.D.A.-Americans with Disabilities Act) Coordinator here at University of Maine at Machias. I am reaching out on the behalf of our science professors here at UMM. The professor is looking to utilize your software to

[ESS] FW: [GNU ELPA] ESS version 24.1.1

2024-02-15 Thread Sparapani, Rodney via ESS-help
Hi Gang: We just tidied up a recent insidious bug. No other changes. Version 24.1.1 of package ESS has just been released in GNU ELPA. You can now find it in M-x list-packages RET. === Emacs Speaks Statistics === More at

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread Duncan Murdoch
On 14/02/2024 5:50 a.m., Martin Maechler wrote: Berwin A Turlach on Wed, 14 Feb 2024 11:47:41 +0800 writes: Berwin A Turlach on Wed, 14 Feb 2024 11:47:41 +0800 writes: > G'day Philipp, > On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help > wrote: >>

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread peter dalgaard
What Martin says... Also, it might help to know that the original, base-R functions are still there, as utils::install.packages() utils::update.packages() (+ most likely, a restart of RStudio to make it adapt to the packages that you installed behind its back.) - Peter D. > On 14 Feb 2024,

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread Rui Barradas
Às 10:50 de 14/02/2024, Martin Maechler escreveu: Berwin A Turlach on Wed, 14 Feb 2024 11:47:41 +0800 writes: Berwin A Turlach on Wed, 14 Feb 2024 11:47:41 +0800 writes: > G'day Philipp, > On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help > wrote: >>

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread Martin Maechler
> Berwin A Turlach > on Wed, 14 Feb 2024 11:47:41 +0800 writes: > Berwin A Turlach > on Wed, 14 Feb 2024 11:47:41 +0800 writes: > G'day Philipp, > On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help > wrote: >> this question is related to this

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread Berwin A Turlach
G'day Philipp, On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help wrote: > this question is related to this > (https://community.rstudio.com/t/packages-are-not-updating/166214/3), > [...] > To sum it up: If I am updating packages (be it via Bioconductor or > CRAN) some packages simply

Re: [R] Optimal use of optim?

2024-02-13 Thread J C Nash
This won't answer the questions, but will point out that I wrote the Nelder-Mead, BFGS (I call it Variable Metric) and CG methods in BASIC in 1974. They were re-coded many times and then incorporated in R around 1995 as I recall (Brian Ripley did the incorporation). There are some great 50

[R] Optimal use of optim?

2024-02-13 Thread Leo Mada via R-help
Dear R-Users, I am interested in the optimal strategy for optim: Q: How to formulate the optimization problem? Q1: Are there benefits for abs(f(x)) vs (f(x))^2? Q2: Are there any limitations for using abs(...)? Regarding point 1: my feeling is that the gradients should be more robust with the

Re: [R] Skip jumps in curve

2024-02-13 Thread Bill Dunlap
Here is the skeleton of a function that lets you supply a function that will be applied to diff(y) to say if this next point should be connected by a line to the previous point. p <- function (x, y = NULL, dy = diff(y), predicate = function(dy) abs(dy)>2, ..., xlab = if (!missing(x))

Re: [R] Skip jumps in curve

2024-02-13 Thread Duncan Murdoch
It should be pretty easy to generalize my version of the `plot.gamma()` function to a version of `curve()` with an extra `discontinuities` argument. Duncan Murdoch On 13/02/2024 1:44 p.m., Leo Mada wrote: Dear Duncan, Thank you very much for the response. I suspected that such an option has

Re: [R] Skip jumps in curve

2024-02-13 Thread Leo Mada via R-help
Dear Duncan, Thank you very much for the response. I suspected that such an option has not been implemented yet. The plot was very cluttered due to those vertical lines. Fortunately, the gamma function is easy to handle. But the feature remains on my wishlist as useful more in general.

Re: [R] Skip jumps in curve

2024-02-13 Thread Duncan Murdoch
On 13/02/2024 10:29 a.m., Leo Mada via R-help wrote: Dear R-Users, Is there a way to skip over without plotting the jumps/discontinuities in curve()? I have not seen such an option, but maybe I am missing something. plot.gamma = function(xlim = c(-6, -1), ylim = c(-1,3), hline = NULL, n =

[R] Skip jumps in curve

2024-02-13 Thread Leo Mada via R-help
Dear R-Users, Is there a way to skip over without plotting the jumps/discontinuities in curve()? I have not seen such an option, but maybe I am missing something. plot.gamma = function(xlim = c(-6, -1), ylim = c(-1,3), hline = NULL, n = 1000) { curve(gamma(x), from = xlim[1], to = xlim[2],

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread Duncan Murdoch
I think you should ask more from the BioC folks, or do more digging yourself. At a minimum we would need to know what arguments were used in the call that failed before we could help you with this. So if this ever happens again, here's what you can do: Run debug(install.packages), then the

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread Rui Barradas
Às 10:09 de 13/02/2024, gernophil--- via R-help escreveu: Yes you're right that it started as an Bioconductor issue. The reason I am writing it here, if because of one of the core members of the Bioconductor project stated this: "(...) But anyway, it's almost certainly an install.packages

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread gernophil--- via R-help
Yes you're right that it started as an Bioconductor issue. The reason I am writing it here, if because of one of the core members of the Bioconductor project stated this: "(...) But anyway, it's almost certainly an install.packages issue rather than BiocManager::install, so you might check over

[R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread Duncan Murdoch
Those three references are about RStudio and Bioconductor (or at least they start out that way, I didn't read through the long threads). Neither of those is relevant here, but from my quick scan it appears the issue is that those systems detect a package in source form is available, then

[R] Packages sometimes don't update, but no error or warning is thrown

2024-02-13 Thread gernophil--- via R-help
Hey everyone,   this question is related to this (https://community.rstudio.com/t/packages-are-not-updating/166214/3), this (https://www.biostars.org/p/9586316/#9586323) and this (https://support.bioconductor.org/p/9156283/#9156308). The two latter ones are pots from myself.   To sum it up: If

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-12 Thread Iago Giné Vázquez
Thanks to both, Duncan and Thomas. Best, Iago De: Tomas Kalibera Enviat el: dilluns, 12 de febrer de 2024 11:18 Per a: Iago Giné Vázquez ; CALUM POLWART ; Duncan Murdoch A/c: r-help@r-project.org Tema: Re: [R] Avoiding Delete key function as 'Quit R' in Rterm

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-12 Thread Tomas Kalibera
On 2/9/24 21:39, Iago Giné Vázquez wrote: Duncan, do you think it's worth to comment this in R-devel list? Duncan filed a bug report via R bugzilla (thanks). There is no way to disable this functionality and it has existed for very long time, I tested that at least in R 3.0. Optionally

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-09 Thread Iago Giné Vázquez
Duncan, do you think it's worth to comment this in R-devel list? Iago De: CALUM POLWART Enviat el: divendres, 9 de febrer de 2024 18:28 Per a: Duncan Murdoch A/c: Iago Giné Vázquez ; r-help@r-project.org Tema: Re: [R] Avoiding Delete key function as 'Quit R'

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-09 Thread CALUM POLWART
I don't use term, but I've just tested it and this is reproducable. Is it a bug? Not sure. If you hit c after getting the message it will cancel the q() request. On Fri, 9 Feb 2024, 17:21 Duncan Murdoch, wrote: > That looks to me like a bug, but I don't use Windows any more, so I > won't

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-09 Thread Duncan Murdoch
That looks to me like a bug, but I don't use Windows any more, so I won't offer to try to fix it for you. In fact I don't think Rterm has many users at all: most Windows users probably use RStudio or one of the other graphical front ends (Visual Studio, Emacs, Rgui, etc.) So maybe you can

Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-09 Thread Iago Giné Vázquez
Yes, indeed, I am talking about Rterm in Windows. Iago De: Duncan Murdoch Enviat el: divendres, 9 de febrer de 2024 13:50 Per a: Iago Giné Vázquez Tema: Re: [R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line On

Re: [R] Is simplify2array working for dimension > 2?

2024-02-09 Thread Jean-Claude Arbaut
Re your mention in your other mail (which didn't go to r-help) of this part of the doc: "The default value, TRUE, returns a vector or matrix if appropriate, whereas if simplify = "array" the result may be an array of “rank” (==length(dim(.))) **one higher than the result of FUN(X[[i]]).**" It's

[R] Avoiding Delete key function as 'Quit R' in Rterm when there are no characters in cursor line

2024-02-09 Thread Iago Giné Vázquez
Hi all, I cite from README.Rterm ^D, DEL : Delete the character under the cursor. That is the general behaviour, but when there is no character (neither under the cursor nor at its left), pressing the Delete key suggests closing the R terminal. Is there any (configurable) way to avoid

Re: [R] Is simplify2array working for dimension > 2?

2024-02-08 Thread Bert Gunter
Jean-Claude: Well, here's my "explanation". Caveat emptor! Note that: "simplify2array() is the utility called from sapply() when simplify is not false" and > sapply(a, I, simplify = "array") [,1] [,2] [1,] list,2 list,2 [2,] list,2 list,2 So it seems that simplify2array() is not

[R] Is simplify2array working for dimension > 2?

2024-02-08 Thread Jean-Claude Arbaut
Reading the doc for ?simplify2array, I got the impression that with the 'higher = T' argument the function returns an array of dimension greater than 2 when it makes sense (the doc says "when appropriate", which is rather vague). I would expect a <- list( list(list(1, 2), list(3, 4)),

Re: [R-es] Depuración de código

2024-02-07 Thread Carlos J. Gil Bellosta
Prueba algo así: ## P1 <- data.frame( Cantidad = 0:10, UtilidadA = c(0,15,28,35,40,45,49,53,55,56,56), UtilidadB = c(0,17,30,37,42,47,51,55,57,58,58) ) PrecioA <- 12 PrecioB <- 16 L_prep <- 90 out <- expand.grid(cant_a = 0:10, cant_b = 0:10) out <- merge(out, P1[,

Re: [R-es] Depuración de código

2024-02-07 Thread Isidro Hidalgo Arellano via R-help-es
Hola, Esto podría simplificar un poco la parte inicial: # Creamos data_frame de cantidad y utilidad P1 <- data.frame( Cantidad= 0:10, UtilidadA = c(0,15,28,35,40,45,49,53,55,56,56), UtilidadB = c(0,17,30,37,42,47,51,55,57,58,58) ) # No uses comillas y cárgalos directamente como numéricos

[R-es] Depuración de código

2024-02-06 Thread Clei Y
Hola a todos Empleando mis limitados conocimientos de R pude resolver un ejercicio elaborando un c�digo, estoy seguro que se puede simplificar, si alguien tiene alg�n tiempo libre agradecer�a me pudiera ayudar depurando el c�digo, lo adjunto junto con unas tablas que representan el inicio y

Re: [R] ggarrange & legend

2024-02-06 Thread Paul Murrell
Hi Using John's example ... data("ToothGrowth") df <-ToothGrowth df$dose <- as.factor(df$dose) ## Box plot bxp <- ggboxplot(df, x = "dose", y = "len", color = "dose", palette = "jco") ## Density plot dens <- ggdensity(df, x = "len", fill = "dose", palette = "jco")

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
Blast it hit send by accident. Anyway the code above is a WWE. I don't see any obvious way no move the legend On Mon, 5 Feb 2024 at 09:13, John Kane wrote: > I'm sorry but that is not a working example. > > A working example needs to create the plots being used. > > For example, stealing some

Re: [R] ggarrange & legend

2024-02-05 Thread Ebert,Timothy Aaron
Would something like this help? library(ggplot2) # Create a plot p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + labs(title = "Scatter Plot", x = "Weight", y = "Miles Per Gallon") # Add text at a specific location p + annotate("text", x = min(mtcars$wt) + 23, y = max(mtcars$mpg) -

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
I'm sorry but that is not a working example. A working example needs to create the plots being used. For example, stealing some code from https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html #= data

Re: [R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
Dear John Kane Dear R community Here my working example 1. Example that is working with legend=”top”. However, as mentioned, the legend is in the middle of the top axis. mylist<-list(p1, p2) dev.new(width=28, height=18) fig1<- ggarrange(plotlist=mylist, common.legend = TRUE,

Re: [R] ggarrange & legend

2024-02-05 Thread John Kane
Could you supply us with a MWE (minimal working example)of what you have so far? Thanks. On Mon, 5 Feb 2024 at 05:00, SIBYLLE STÖCKLI via R-help < r-help@r-project.org> wrote: > Dear R community > > It is possible to adjust the legend in combined ggplots using ggarrange > with > be positions

Re: [R] DrDimont package in R

2024-02-05 Thread John Kane
Nothing got through. Try plain text rather than HTML. On Mon, 5 Feb 2024 at 06:04, Anas Jamshed wrote: > > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >

[R] DrDimont package in R

2024-02-05 Thread Anas Jamshed
[[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

[R] ggarrange & legend

2024-02-05 Thread SIBYLLE STÖCKLI via R-help
Dear R community It is possible to adjust the legend in combined ggplots using ggarrange with be positions top, bottom, left and right. My question: Is there a function to change the position of the legend to topright or bottomleft? Right and top etc are in the middle of the axis. Kind regards

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Hi Kimmo, The code you sent has worked for me. Thank you very much. *Jibrin Adejoh Alhassan (Ph.D)* Department of Physics and Astronomy, University of Nigeria, Nsukka On Mon, Feb 5, 2024 at 7:40 AM Kimmo Elo wrote: > Hi, > > the command line with 'text' should be: > > text(-8,-8,

Re: [R] Help

2024-02-04 Thread Kimmo Elo
Hi, the command line with 'text' should be: text(-8,-8, expression(R^2 * " = 0.62, r = 0.79, N = 161"), cex = 2 ) Best, Kimmo su, 2024-02-04 kello 17:16 +0100, Jibrin Alhassan kirjoitti: > Here is the script I used to plot the graph indicating the text I > wanted to > insert. The line in the

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Many thanks. On Mon, Feb 5, 2024, 1:06 AM Rolf Turner wrote: > > Please see fortunes::fortune(285). > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599 ext. 89622 > Home

Re: [R] Help

2024-02-04 Thread Rolf Turner
Please see fortunes::fortune(285). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __

Re: [R] Help

2024-02-04 Thread Martin Møller Skarbiniks Pedersen
On Sun, 4 Feb 2024 at 17:26, Jibrin Alhassan wrote: > > Here is the script I used to plot the graph indicating the text I wanted to > insert. The line in the script that I have issues with is: text(-8,-8, > "R^2= 0.62", r = 0.79, N = 161", cex = 2 > R^2= 0.62 is not producing R squared = 0.62.

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Here is the script I used to plot the graph indicating the text I wanted to insert. The line in the script that I have issues with is: text(-8,-8, "R^2= 0.62", r = 0.79, N = 161", cex = 2 R^2= 0.62 is not producing R squared = 0.62. Thanks. Sys.setenv( TZ="GMT" ) dt <-

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Hi Elo, It gave this error message: CR_plot2.R:14:37: unexpected string constant 13: plot(FDapt,FDcli, pch = 16, cex.lab = 1.6, cex.axis = 1.4, cex.main = 0.8, font.lab = 1.7, font.axis = 1.7, col = "red",main = "Simultaneous Events at CLMX and APTY",ylab="CLMX",xlab="APTY") 14: text(-8,-8,

Re: [R] Help

2024-02-04 Thread Kimmo Elo
Hi, maybe this works: expression(R^2 * "= 0.62") HTH, Kimmo 4. helmik. 2024, 16.11, Jibrin Alhassan mailto:jibrin.alhas...@unn.edu.ng>> kirjoitti: I have done a scatter plot in R. I want to insert the coefficient of determination R^2 = 0.62 as a text in the plot. I have tried to write R^2

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Thank you Zhao for the code. When I replotted the graph after inserting the code in my script, it gave me this error message without plotting the graph: Warning message: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : extra argument ‘col’ will be disregarded. My regards.

Re: [R] Help

2024-02-04 Thread Jinsong Zhao
?plotmath expression(R^2==0.62) On 2024/2/4 18:10, Jibrin Alhassan wrote: I have done a scatter plot in R. I want to insert the coefficient of determination R^2 = 0.62 as a text in the plot. I have tried to write R^2 but could not produce R2. I would appreciate it if someone could help me with

[R] Help

2024-02-04 Thread Jibrin Alhassan
I have done a scatter plot in R. I want to insert the coefficient of determination R^2 = 0.62 as a text in the plot. I have tried to write R^2 but could not produce R2. I would appreciate it if someone could help me with the syntax. I have tried: expression(paste("", R^2,"=", 0.62)), but it did

Re: [R] List of Words in BioWordVec

2024-02-03 Thread Martin Møller Skarbiniks Pedersen
On Fri, Feb 2, 2024, 01:37 TJUN KIAT TEO wrote: > Is there a way to extract list of words in BioWordVec in R > library(text) word_vectors <- textEmbed(texts = NULL, model = 'bioWordVecModel', model_type = 'wordvectors') word_list <- rownames(word_vectors$wordvectors) [[alternative

Re: [R] gathering denominator under frac

2024-02-02 Thread Bert Gunter
BTW, for your amusement, ylab = ~ frac(additive ~ HCO[3]^"-", true ~ HCO[3]^"-" )) also should work. The reason is (from ?plotmath): "In most cases other language objects (names and calls, including formulas) are coerced to expressions and so can also be used."

Re: [R] gathering denominator under frac

2024-02-02 Thread Bert Gunter
... or if I understand correctly, simply expression(frac(additive ~ HCO[3]^"-", true ~ HCO[3]^"-" ))) Cheers, Bert On Fri, Feb 2, 2024 at 3:06 AM Rui Barradas wrote: > Às 10:01 de 02/02/2024, Troels Ring escreveu: > > Hi friends - I'm plotting a ratio of

Re: [R] gathering denominator under frac

2024-02-02 Thread Rui Barradas
Às 10:01 de 02/02/2024, Troels Ring escreveu: Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and ylab(expression(paste(frac("additive BIC","true BIC" worked OK - but now I have been asked to put the chemistry instead - so I wrote  

[R] gathering denominator under frac

2024-02-02 Thread Troels Ring
Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and ylab(expression(paste(frac("additive BIC","true BIC" worked OK - but now I have been asked to put the chemistry instead - so I wrote  ylab(expression(paste(frac("additive",HCO[3]^"-","true",HCO[3]^"-" - and frac saw that

Re: [R] List of Words in BioWordVec

2024-02-01 Thread Jeff Newmiller via R-help
I thought so too, but Google suggests there is at least one package on CRAN with this symbol in it. OP: a) You should always mention which contributed package you are using. Most references to this term online seem to be related to Python rather than R. b) This seems like extremely

Re: [R] List of Words in BioWordVec

2024-02-01 Thread Bert Gunter
I *think* this might be better posted here: https://bioconductor.org/help/support/ Cheers, Bert On Thu, Feb 1, 2024 at 4:37 PM TJUN KIAT TEO wrote: > Is there a way to extract list of words in BioWordVec in R > > Thank you > > Tjun Kiat > > [[alternative HTML version deleted]] > >

[R] List of Words in BioWordVec

2024-02-01 Thread TJUN KIAT TEO
Is there a way to extract list of words in BioWordVec in R Thank you Tjun Kiat [[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

Re: [ESS] ESS[SAS]: experience, fixes, and starting questions

2024-02-01 Thread Sparapani, Rodney via ESS-help
Hi Frederico: Responding to your questions… 1. Is fixing/adding this support to ESS something desirable, or better left out of the main tree?” We are accepting patches. But, iESS[SAS] is more or less historically frozen at this point since it’s a dead-end as far as features go. 2. You

Re: [R] Need help testing a problem

2024-02-01 Thread Roy Mendelssohn - NOAA Federal via R-help
HI Rui: First and foremost thanks for taking the time to do this. That was a typo, it was httr and is not needed, I was careless. That request works fine on a Mac and a Linux box. We needed to check if there was something about iour internal network settings, our Windows setup or

Re: [R] Need help testing a problem

2024-02-01 Thread Rui Barradas
Às 23:47 de 31/01/2024, Roy Mendelssohn - NOAA Federal via R-help escreveu: HI All: We are trying to figure out a problem that is occurring with a package, and we need a non-NOAA person with a Windows computer with the latest R to test for us what is failing (but works on Macs and Linux from

<    4   5   6   7   8   9   10   11   12   13   >