Re: [R] Associate a .R file with the RGui

2022-11-06 Thread Amarjit Chandhial via R-help
David, Thanks. Amarjiit > On 6 Nov 2022, at 00:40, David Winsemius wrote: > > >> On 11/5/22 09:58, Amarjit Chandhial via R-help wrote: >> Hi Jeff, >> >> >> Please see my original question. > > You were told that RGui is not an editor. > > Are you implying that your initial message

Re: [R] Associate a .R file with the RGui

2022-11-06 Thread Uwe Ligges
On 06.11.2022 01:40, David Winsemius wrote: On 11/5/22 09:58, Amarjit Chandhial via R-help wrote: Hi Jeff, Please see my original question. You were told that RGui is not an editor. Are you implying that your initial message contained an implicit request for instructions on how to get

Re: [R] Selecting a minimum value of an attribute associated with point values neighboring a given point and assigning it as a new attribute

2022-11-06 Thread Eric Berger
Whoops ... left out a line in Part 2. Resending with the correction ## PART 2: You can use this code on the real data with f() defined appropriately A <- matrix(0,N,N) v <- 1:N ## get the indices (j,k) where j < k (as columns in a data.frame) idx <- expand.grid(v,v) |> rename(j=Var1,k=Var2) |>

Re: [R] Selecting a minimum value of an attribute associated with point values neighboring a given point and assigning it as a new attribute

2022-11-06 Thread Eric Berger
Hi Tiffany, Here is some code that might help with your problem. I solve a "toy" problem that is conceptually the same. Part 1 sets up my toy problem. You would have to replace Part 1 with your real case. The main point is to define a function f(i, j, data) which returns 0 or 1 depending on

Re: [R] Associate a .R file with the RGui

2022-11-06 Thread Amarjit Chandhial via R-help
Hi Uwe, RGui does have advantages vs. RStudio, and vice-versa. RStudio is much faster than it used to be. I currently have .R files associated with RStudio, i.e. in File Explorer if I double-click on a .R file it opens in the editor in RStudio as an R script. In File Explorer if I

Re: [R] Associate a .R file with the RGui

2022-11-06 Thread Uwe Ligges
On 06.11.2022 17:21, Amarjit Chandhial via R-help wrote: Hi Uwe, RGui does have advantages vs. RStudio, and vice-versa. RStudio is much faster than it used to be. I currently have .R files associated with RStudio, i.e. in File Explorer if I double-click on a .R file it opens in the

Re: [R] Associate a .R file with the RGui

2022-11-06 Thread Amarjit Chandhial via R-help
Hi Uwe, I can do 1. 1. Add the line if ( length(z <- commandArgs(TRUE)) ) utils::file.edit(z[1]) to the Rprofile.site file; and My Rprofile.site file is: "C:/PROGRA~1/R/R-42~1.2/etc/Rprofile.site" How do I do 2, step-by-step? 2. Edit the registry to associate the .R

Re: [R] Is this *always* the intended R^2 value for no intercept in lm?

2022-11-06 Thread David Winsemius
To Thierry; When you omit an intercept you require that the line in multivariate space that represents the ‘predictions’ go through the (0,0,0,…) I.e. the origin. It’s a fairly restrictive requirement. There IS an intercept, even though it’s not explicitly seen in the model. If it’s not

[R] (no subject)

2022-11-06 Thread Nick Wray
Hello - I am using the MICE package to impute missing values - the input data are up to six vectors of parallel hourly temperature measurements for Scottish weather stations across a calendar year. None of the vectors have more than 5% NAs as I have filtered ones with more out. Most of the sets