Re: [R] understanding as.list(substitute(...()))

2020-10-06 Thread Dénes Tóth
Hi Tim, I have also asked a similar question a couple of months ago, and someone else did the same recently, maybe on r-devel. We received no "official" response, but Deepayan Sarkar (R Core Team member) claimed that: " There is no documented reason for this to work (AFAIK), so again, I wou

Re: [R] understanding as.list(substitute(...()))

2020-10-06 Thread Tim Taylor
Cheers Denes, That's useful to know. I'll stick with the match.call version instead. Interestingly I initially tried to post to R-devel (as I thought it may involve something internal) but was asked to post here instead. Best Tim On Tue, 6 Oct 2020 at 08:22, Dénes Tóth wrote: > > Hi Tim, >

Re: [R] understanding as.list(substitute(...()))

2020-10-06 Thread peter dalgaard
> On 6 Oct 2020, at 09:22 , Dénes Tóth wrote: > > > foo <- function(...) substitute({...()}) > > foo(abc$de, fg[h], i) > { > pairlist(abc$de, fg[h], i) > } > > foo(abc$de, fg[h], , i) # add a missing argument for extra fun > { > as.pairlist(alist(abc$de, fg[h], , i)) > } > The 2nd one he

Re: [R] R-help Digest, Vol 212, Issue 4

2020-10-06 Thread Avi Gross via R-help
Nice alternative for some cases but I do not get the desires result as one long vector. I would change the last line to this: unlist(as.vector(sapply(1:length(a), FUN=function(x, a, b) a[x]:b[x],

[R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Sorkin, John
Colleagues, I am trying to learn to use uniroot to solve a simple linear equation. I define the function, prove the function and a call to the function works. When I try to use uniroot to solve the equation I get an error message, Error in yfu n(x,10,20) : object 'x' not found. I hope someone ca

Re: [R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Duncan Murdoch
On 06/10/2020 11:00 a.m., Sorkin, John wrote: Colleagues, I am trying to learn to use uniroot to solve a simple linear equation. I define the function, prove the function and a call to the function works. When I try to use uniroot to solve the equation I get an error message, Error in yfu n(x,1

[R] Installing Perl For Use in R

2020-10-06 Thread Philip
I’m getting nowhere with this. From the website below I clicked on the ActivePerl 5.26 button which seems to lead me into creating projects on the Cloud rather than downloading the software to my hard drive. https://www.activestate.com/products/perl/downloads/ Can someone give me some adv

Re: [R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Jeff Newmiller
Have you looked at the examples in ?uniroot? Don't call yfun... let uniroot do that. On October 6, 2020 8:00:59 AM PDT, "Sorkin, John" wrote: >Colleagues, >I am trying to learn to use uniroot to solve a simple linear equation. >I define the function, prove the function and a call to the functio

Re: [R] Installing Perl For Use in R

2020-10-06 Thread Marc Schwartz via R-help
Hi, What OS are you on? It has been years since I used ActiveState, but it looks like you now need to create an account with them prior to downloading the installation files. They seem to give you the option of creating an account with them, or using Github. I would opt for the former, even t

Re: [R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Jeff Newmiller
... or uniroot( yfun, c( -100, 100 ), diffMean=10, diffSE=20 ) On October 6, 2020 8:06:35 AM PDT, Duncan Murdoch wrote: >On 06/10/2020 11:00 a.m., Sorkin, John wrote: >> Colleagues, >> I am trying to learn to use uniroot to solve a simple linear >equation. I define the function, prove the funct

Re: [R] Solving a simple linear equation using uniroot give error object 'x' not found

2020-10-06 Thread Rolf Turner
On Tue, 6 Oct 2020 15:00:59 + "Sorkin, John" wrote: > Colleagues, > I am trying to learn to use uniroot to solve a simple linear > equation. I define the function, prove the function and a call to the > function works. When I try to use uniroot to solve the equation I get > an error message