[R] gdistance::accCost fails on some cases

2020-05-14 Thread Deniz Ugur
Referring to my mail bellow, this situation is not a expected behavior. Do you think that this is because of a fault in my codes or some bug in gdistance? What could be the problem? Thank you for your consideration. -- Forwarded message - From: Deniz Uğur Date: Thu, May 14, 2020,

Re: [R] sort

2020-05-14 Thread Jim Lemon
Hi Val, Your problem is keeping the orders straight. You want dates decreasing and names increasing: DF1<-read.table(text="name ddate A 2019-10-28 A 2018-01-25 A 2020-01-12 A 2017-10-20 B 2020-11-20 B 2019-10-20 B 2017-05-20 B 2020-01-20 C 2009-10-01 ",header=TRUE) DF1$

Re: [R] [External] sort

2020-05-14 Thread Richard M. Heiberger
## the data you gave us DF1 <- read.table(text="name ddate A 2019-10-28 A 2018-01-25 A 2020-01-12 A 2017-10-20 B 2020-11-20 B 2019-10-20 B 2017-05-20 B 2020-01-20 c 2009-10-01 ", header=TRUE, colClasses=c("character", "POSIXct")) DF1 D2 <- split(DF1, DF1$name) D2 s

Re: [R] Help with map()

2020-05-14 Thread Jim Lemon
Hi Bill, Have you compared str(radius3) to str(clus1)? It may be quite different. Jim On Thu, May 14, 2020 at 8:24 PM Poling, William via R-help wrote: > > #RStudio Version Version 1.2.1335 > sessionInfo() > # R version 4.0.0 Patched (2020-05-03 r78349) > #Platform: x86_64-w64-mingw32/x64 (64-

[R] sort

2020-05-14 Thread Val
HI All, I have a sample of data frame DF1<-read.table(text="name ddate A 2019-10-28 A 2018-01-25 A 2020-01-12 A 2017-10-20 B 2020-11-20 B 2019-10-20 B 2017-05-20 B 2020-01-20 c 2009-10-01 ",header=TRUE) 1. I want sort by name and ddate on decreasing order and the output

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Thu, 14 May 2020, Jeff Newmiller wrote: Running R as root, ever, is a completely unnecessary elevation of privileges... but that discussion is getting OT as it pertains to OS security and stability rather than R language. Only to upgrade the core package and install/update CRAN packages. Al

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
Running R as root, ever, is a completely unnecessary elevation of privileges... but that discussion is getting OT as it pertains to OS security and stability rather than R language. On May 14, 2020 2:21:43 PM PDT, Rich Shepard wrote: >On Thu, 14 May 2020, Jeff Newmiller wrote: > >> On the contr

Re: [R] Help with map()

2020-05-14 Thread Mark Fowler
Any chance you forgot to load a library (e.g. maps) for the second round, or maybe changed a loading sequence and overwrote the intended map function? Looks like #2 might be trying to use a purrr-style map function. Sent from Mail for Windows 10 F

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Thu, 14 May 2020, Jeff Newmiller wrote: On the contrary... that is the use case in which it makes the least sense to muck with system files. System files are maintained using system package management tools which at best lag terribly, while R packages are much easier to manage using R's inter

Re: [R] How to find a split point in a curve?

2020-05-14 Thread Gabor Grothendieck
We can use nls2 to try each value in 10:100 as a possible split point picking the one with lowest residual sum of squares: library(nls2) fm <- nls2(Y ~ cbind(1, pmin(X, X0)), start = data.frame(X0 = 10:100), algorithm = "plinear-brute") plot(Y ~ X) lines(fitted(fm) ~ X, col = "red") > fm Nonlin

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
On the contrary... that is the use case in which it makes the least sense to muck with system files. System files are maintained using system package management tools which at best lag terribly, while R packages are much easier to manage using R's internal package tools with no elevated privileg

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Thu, 14 May 2020, Sarah Goslee wrote: If you don't mind, I'm curious what didn't work - I would like to be able to update the document accordingly. Sarah, Here's part of the sequence: install.packages('packagelist') Warning message: package ‘packagelist’ is not available (for R version

Re: [R] Automating package updates after major version change

2020-05-14 Thread Sarah Goslee
If you don't mind, I'm curious what didn't work - I would like to be able to update the document accordingly. When you used .libPaths() what did it tell you? Did you edit that result to be for the previous version, and swap that into the list.files() command? I thought about automating it, but I

Re: [R] Notational derivative in R

2020-05-14 Thread Duncan Murdoch
On 14/05/2020 1:50 p.m., Eric Berger wrote: Hi Christofer, Look at https://cran.r-project.org/web/views/NumericalMathematics.html and within that page search for Symbolic Mathematics. It shows two packages: Ryacas and rSymPy. I have no experience with them but they may be a good place to start.

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Thu, 14 May 2020, Sarah Goslee wrote: Note that install.packages requires "character vector of the names of packages whose current versions should be downloaded from the repositories" as stated in the help file. Sarah, Ah, yes. I missed that. If you aren't going to do it the way I did, t

Re: [R] Automating package updates after major version change

2020-05-14 Thread Sarah Goslee
Hi Rich, Note that install.packages requires "character vector of the names of packages whose current versions should be downloaded from the repositories" as stated in the help file. If you aren't going to do it the way I did, then you need to read your text file into R and create that character

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Thu, 14 May 2020, Jeff Newmiller wrote: Why are you mucking with the system-level library? It is quite unusual to have a use-case in which you should not be adjusting your personal library. Jeff, I'm the only user so there's no difference. Regards, Rich _

Re: [R] Notational derivative in R

2020-05-14 Thread Jeff Newmiller
FWIW I have found all such tools to require babysitting... and for interactive use I prefer wxMaxima and some manual translation to R. On May 14, 2020 10:50:56 AM PDT, Eric Berger wrote: >Hi Christofer, >Look at https://cran.r-project.org/web/views/NumericalMathematics.html >and within that page

Re: [R] Automating package updates after major version change

2020-05-14 Thread Jeff Newmiller
Why are you mucking with the system-level library? It is quite unusual to have a use-case in which you should not be adjusting your personal library. On May 14, 2020 10:05:53 AM PDT, Rich Shepard wrote: >On Sun, 26 Apr 2020, Sarah Goslee wrote: > >> Not so coincidentally, I just worked thru this

Re: [R] Notational derivative in R

2020-05-14 Thread Eric Berger
Hi Christofer, Look at https://cran.r-project.org/web/views/NumericalMathematics.html and within that page search for Symbolic Mathematics. It shows two packages: Ryacas and rSymPy. I have no experience with them but they may be a good place to start. HTH, Eric On Thu, May 14, 2020 at 8:43 PM Ch

[R] Notational derivative in R

2020-05-14 Thread Christofer Bogaso
Hi, I was wondering if R can perform notational derivative something like Mathematica does as explained in https://reference.wolfram.com/language/howto/TakeADerivative.html Any pointer will be highly appreciated. Thanks, __ R-help@r-project.org mailin

Re: [R] Automating package updates after major version change

2020-05-14 Thread Rich Shepard
On Sun, 26 Apr 2020, Sarah Goslee wrote: Not so coincidentally, I just worked thru this for myself. http://numberwright.com/2020/04/clean-and-new/ Sarah, This isn't working for me on Slackware-14.2/x86_64. My R library is in /usr/lib64/R/library/ and I copied the contents to a text file, one

Re: [R] How to find a split point in a curve?

2020-05-14 Thread Bert Gunter
You need to mathematically define 'turning point' first: "end of exponential phase" is subjective and meaningless. Once you have a precise mathematical formulation in hand, you can proceed. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into

Re: [R] How to find a split point in a curve?

2020-05-14 Thread Rui Barradas
Hello, Are you looking for a segmented regression? fit <- lm(Y ~ X) seg <- segmented::segmented(fit, seg.Z = ~X) seg$psi[, 'Est.'] #[1] 29.21595 plot(X, Y) plot(seg, add = TRUE) Hope this helps, Rui Barradas Às 16:12 de 14/05/20, Luigi Marongiu escreveu: Dear all, I am trying to find a tu

[R] How to find a split point in a curve?

2020-05-14 Thread Luigi Marongiu
Dear all, I am trying to find a turning point in some data. In the initial phase, the data increases more or less exponentially (thus it is linear in a nat log transform), then reaches a plateau. I would like to find the point that marks the end of the exponential phase. I understand that the funct

Re: [R] Help with map()

2020-05-14 Thread Poling, William via R-help
Hi Jim, thanks for the advice, those modifications are outside my capabilities at the moment but I will play around with it I guess. Thank you. WHP Proprietary -Original Message- From: Jim Lemon Sent: Thursday, May 14, 2020 7:27 AM To: Poling, William ; r-help mailing list Subjec

Re: [R] Help with map()

2020-05-14 Thread Jim Lemon
Hi Bill, I guess if you run makeDensityMatrix on subsets of the geographic locations and then overlay the different results with densityGrid using different colors, it should work as long as the regions don't overlap. Jim On Thu, May 14, 2020 at 10:20 PM Poling, William wrote: > > Hello Jim, et.

Re: [R] Help with map()

2020-05-14 Thread Poling, William via R-help
Hello Jim, et.al, again. One last question please. Since this routine works best with larger volume of geo points, is there a way to modify this routine to accommodate more than one cluster and differentiated by different colors? #Single cluster routine clus3 <- individual_dets_sf_3X %>%

Re: [R] Help with map()

2020-05-14 Thread Poling, William via R-help
Hi, it is working now using just the most necessary pkgs. Evidently when there are so few rows (clus1=53) the map does not cooperate, I get the plot but no map image? As I increase records the map begins to appear as it did for Radius1-8 routines Thank you for your time and trouble my friends.

Re: [R] Help with map()

2020-05-14 Thread Poling, William via R-help
Hi, I ran this which is partially successful. I got long & lat (x&y) with red plot values however, no map behind it? Not sure what I might be missing now in terms of pkgs I suppose? #Just use the basic pkgs library(magrittr)#for %>% function library(plotrix) library(maps) library(dplyr)#For filt

Re: [R] (no subject)

2020-05-14 Thread Ivan Krylov
Dear Luigi, These questions (and your previous one about R on Chromebook) are best directed to the R-SIG-Debian mailing list [*], or maybe Ubuntu forums [**]. I think that they are off-topic here on R-help. Here is a short advice: try to make sure that you have the r-recommended package installed

Re: [R] Help with map()

2020-05-14 Thread Poling, William via R-help
Hi Jim, and Mark, thank you for your response. 1. I have restarted R 2. I have only initiated library(magrittr)#for %>% function & library(plotrix), no other libraries thinking that another may be overwriting something. 3. I have checked the str() str(radius3) 'data.frame': 1990 obs. of 6 v

[R] (no subject)

2020-05-14 Thread Luigi Marongiu
Dear all, I am trying to upgrade from ubuntu 19 to 20 but I got some R stuff that stop the process: ``` $ apt list --upgradable Listing... Done r-cran-kernsmooth/xenial 2.23-15-3xenial0 amd64 [upgradable from: 2.23-15-3build2] r-cran-nnet/xenial 7.3-12-2xenial0 amd64 [upgradable from: 7.3-12-2build

[R] Help with map()

2020-05-14 Thread Poling, William via R-help
#RStudio Version Version 1.2.1335 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) Good morning. I ran routines like this one yesterday with no errors. #Radius3 str(radius3) radius3 <- indi

[R] Resolve unmet dependencies and install R 3.6 on chromebook

2020-05-14 Thread Luigi Marongiu
I tried to upgrade R from 3,3 to 3.6 on a Chromebook but I am getting this error ``` .org/debian stretch InRelease Hit:4 https://deb.debian.org/debian-security stretch/updates InRelease Hit:5 https://deb.debian.org/debian stretch-backports InRelease Hit:6 http://cran.wustl.edu/bin/linux/ubuntu xeni