Re: [R] Logic operators...more than one??

2018-10-03 Thread Bert Gunter
Inline. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Oct 3, 2018 at 4:02 PM David Doyle wrote: > I'm sure this is a simple question but I'm

Re: [R] Logic operators...more than one??

2018-10-03 Thread Marc Schwartz via R-help
> On Oct 3, 2018, at 7:03 PM, David Doyle wrote: > > I'm sure this is a simple question but I'm not sure where to find the > answer. > > I want to remove some of the data. For example when my Location column is > MW-09, MW-10, or MW-11. > > It works fine if I ONLY list ONE of the locations

Re: [R] Logic operators...more than one??

2018-10-03 Thread Jim Lemon
Hi David, I think you want this: SampledWells <- MyData[!( MyData$Location %in% c("MW-09", "MW-10")), ] Jim On Thu, Oct 4, 2018 at 9:02 AM David Doyle wrote: > > I'm sure this is a simple question but I'm not sure where to find the > answer. > > I want to remove some of the data. For example

[R] Logic operators...more than one??

2018-10-03 Thread David Doyle
I'm sure this is a simple question but I'm not sure where to find the answer. I want to remove some of the data. For example when my Location column is MW-09, MW-10, or MW-11. It works fine if I ONLY list ONE of the locations as in: SampledWells <- MyData[ MyData$Location != "MW-09", ] But if

Re: [ESS] Error starting R

2018-10-03 Thread Jeremie Juste via ESS-help
Hello, Can you specify the ess version you are using? I would suggest disabling global-font-lock-mode (M-x global-font-lock-mode) before launching R to see if it works. It is not a fix but just a way to investingate where the problem might be. Best regards, Jeremie Neil Shephard via

Re: [ESS] Error starting R

2018-10-03 Thread Jeremie Juste via ESS-help
Hello, Glad you could sort it out. I think version controling the .emacs file and the .emacs.d directory could help solve these issues faster. You could easily go back to a previous working version. This might be helpful if you are in a situation where you really need things to work. I'm

Re: [ESS] Error starting R

2018-10-03 Thread Jeremie Juste via ESS-help
Hello, Be sure to CC ess-help@r-project.org in your reply as your mail can help others as well. You might find better support in this way too. I updated by ess to your version : ess-version: 18.10 and could load R without difficulty. I'm using GNU Emacs 25.3.3 (x86_64-pc-linux-gnu, GTK+

Re: [ESS] Error starting R

2018-10-03 Thread Neil Shephard via ESS-help
Timely On Wed, 3 Oct 2018 at 20:16, Alex Branham wrote: > > > I've tried disabling ess-smart-underscore as Alex suggests but no joy. > > I'm not familiar with how this package works but disabling it (by > removing the "require" from your init file) might not be enough. Emacs's > package

[R] Revolutions blog: September 2018 roundup

2018-10-03 Thread David Smith (CDA) via R-help
Since 2008, Microsoft staff and guests have written about R at the Revolutions blog (http://blog.revolutionanalytics.com) and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R

Re: [R] Maximum number of iterations (maxit) does not work in hydroPSO-modFit-optimr in r

2018-10-03 Thread ProfJCNash
As the author of optimx (there is a new version just up), I can say that maxit only "works" if the underlying solver is set up to use it. You seem to be mistaken, however, in this case, as the following example shows. > library(optimx) > library(adagio) > sessionInfo() R version 3.5.1

[R] Maximum number of iterations (maxit) does not work in hydroPSO-modFit-optimr in r

2018-10-03 Thread Ahmed Attia
The argument maxit used in libraries optimr, hydroPSO, and FME to control the maximal number of iterations to be performed does not work at ALL!! This needs to be fixed... mysamp <- function(n, m, s, lwr, upr, nnorm) { samp <- rnorm(nnorm, m, s) samp <- samp[samp >= lwr & samp <= upr] if

Re: [R] R - Reading a horizontally arranged csv file, replacing values and saving again

2018-10-03 Thread William Dunlap via R-help
Using read.table to read data with a variable number of entries per row is probably a mistake - data.frames (which read.table returns) are not meant for this sort of data. You want to store the data in R as a list with names. E.g., readYourFormat <- function(connection) { # connection is a

Re: [R] Sp-package overlay

2018-10-03 Thread MacQueen, Don via R-help
In addition, the function you want is sp::over or its equivalent in sf -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 Lab cell 925-724-7509 On 10/2/18, 1:41 PM, "R-help on behalf of Ben Tupper" wrote: Hi, I'm

Re: [ESS] Error starting R

2018-10-03 Thread Neil Shephard via ESS-help
Apologies Jeremie, stupid *faux pas* not replying to the list. Running... emacs -Q ...and then loading ess from scratch works (bar similar errors about julia that you mention). R starts fine. I've tried disabling ess-smart-underscore as Alex suggests but no joy. I'll have a further play

Re: [R] Polygon

2018-10-03 Thread Rui Barradas
Hello, If you change cord.x and cord.y to cord.x <- c(-3, seq(-3, -1.96, 0.01), -1.96) cord.y <- c(0, dnorm(seq(-3, -1.96, 0.01)), 0) then you will not need the call to abline. Hope this helps, Rui Barradas Às 02:50 de 03/10/2018, Steven Yen escreveu: Thanks!!! It did wonders. Steven On

[ESS] Error starting R

2018-10-03 Thread Neil Shephard via ESS-help
Hi, I've recently encountered a problem which prevents me from using M-x R to start an R session under Emacs. On doing so I'm informed that... autoload-do-load: Wrong type argument: consp, nil I'm using Emacs 25.3.1 with ESS installed from ELPA (20181003.755). I've asked on the Emacs

Re: [R] R - Reading a horizontally arranged csv file, replacing values and saving again

2018-10-03 Thread Manoranjan Muthusamy
Thanks for the short but informative answer, Bill. But still, each row has four columns..right? Although the *NA* is replaced by a blank cell, because of the extra comma it still is a four column row. Is there any way to avoid/remove the extra comma when NA is replaced which will make it a three

Re: [R-es] Cambiar formato fecha

2018-10-03 Thread Miriam Alzate
Buenas, Gracias a todos por vuestra informaci�n. Finalmente, he conseguido pasar todas las fechas a un mismo formato en excel y ya en R me lo ha convertido bien utilizando la funci�n as.date. Tuve que cambiar los datos originales...Por suerte lo pod�a hacer. De todas formas, muchas gracias