Re: [R] 2 D density plot interpretation and manipulating the data

2020-10-08 Thread Ana Marija
My understanding is that this represents bivariate normal approximation of the data which uses the kernel density function to test for inclusion within a level set. (please correct me) In order to exclude the outlier to these ellipses/contours is it advisable to do something like this:

Re: [R] [External] Re: unable to access index for repository...

2020-10-08 Thread Steven Yen
Oh Hi Arne, You may recall we visited with this before. I do not believe the problem is algorithm specific. The algorithms I use the most often are BFGS and BHHH (or maxBFGS and maxBHHH). For simple econometric models such as probit, Tobit, and evening sample selection models, old and new

[R] 2 D density plot interpretation and manipulating the data

2020-10-08 Thread Ana Marija
Hello, I have a data frame like this: > head(SNP) mean var sd FQC.10090295 0.0327 0.002678 0.0517 FQC.10119363 0.0220 0.000978 0.0313 FQC.10132112 0.0275 0.002088 0.0457 FQC.10201128 0.0169 0.000289 0.0170 FQC.10208432 0.0443 0.004081 0.0639 FQC.10218466 0.0116 0.000131

Re: [R] [External] Re: unable to access index for repository...

2020-10-08 Thread Arne Henningsen
Hi Steven Which optimisation algorithms in maxLik work better under R-3.0.3 than under the current version of R? /Arne On Thu, 8 Oct 2020 at 21:05, Steven Yen wrote: > > Hmm. You raised an interesting point. Actually I am not having problems with > aod per se—-it is just a supporting package

Re: [R] [External] Re: unable to access index for repository...

2020-10-08 Thread Steven Yen
Hmm. You raised an interesting point. Actually I am not having problems with aod per se—-it is just a supporting package I need while using old R. The essential package I need, maxLik, simply works better under R-3.0.3, for reason I do not understand—specifically the numerical gradients of the

Re: [R] [External] Re: unable to access index for repository...

2020-10-08 Thread Richard M. Heiberger
I wonder if you are perhaps trying to solve the wrong problem. If you like what the older version of the aod package does, but not the current version, then I think the solution is to propose an option to the aod maintainer that would restore your preferred algorithm into the current version, and

Re: [R] Lahman Baseball Data Using R DBI Package

2020-10-08 Thread Rui Barradas
Hello, Às 17:26 de 08/10/20, Bill Dunlap escreveu: This is really a feature of SQL, not R. SQL requires that you double quote column names that start with numbers, include spaces, etc., or that are SQL key words. Right, but there's no need to escape the double quotes, just put the SQL

[R] Retrosheet Data

2020-10-08 Thread Philip
Have used Jim Albert’s code to extract baseball data from Retrosheet. function(team){ P <- getRetrosheet("play",2013,team) get_plays <- function(j) data.frame(Game=P[[j]]$id[1],P[[j]]$play)#from $id and $play section of retrosheet data do.call("rbind",lapply(1:length(P),get_plays)) }

Re: [R] RStudio question

2020-10-08 Thread Rui Barradas
Hello, This question looks like a homework question. The posting guide syas that "Basic statistics and classroom homework: R-help is not intended for these." I would take a look at help('cut') # pay attention to argument labels help('ifelse') help('findInterval') Hope this helps, Rui

Re: [R] unable to plot bode - phase with control package

2020-10-08 Thread fr1d_mail via R-help
thank you for the reply ! Le 08/10/2020 à 16:32, Jeff Newmiller a écrit : a) What is so difficult about the idea that this list is about R, not theory? I don't need theory here, I just need the way specialist in R language will solve this *coding* issue. Regarding the theory I think I have

Re: [R] unable to access index for repository...

2020-10-08 Thread Jeff Newmiller
All support on this list is voluntary, and support for old versions of R is not even necessarily on-topic here which is why you keep getting nudged to upgrade. Your "need" for support for an old version is definitely not "our" problem, so I suggest you start looking for a consultant if this

Re: [R] RStudio question

2020-10-08 Thread peter dalgaard
This list has a no-homework policy. I assume that your teaching material has examples that are sufficiently similar so that you should be able to modify them. -pd > On 8 Oct 2020, at 10:10 , Xavier Garcia via R-help > wrote: > > I'm solving the following problem: Create a variable (column)

Re: [R] unable to access index for repository...

2020-10-08 Thread Steven Yen
Thanks for the help. I have a reason to continue with R-3.0.3. I used maxLik to estimate econometric models and some of them are better handled with R-3.0.3 (but not later)a sad reality I do not like. Here is what I did. I downloaded

Re: [R] unable to access index for repository...

2020-10-08 Thread Duncan Murdoch
Don't choose a mirror. That will override the repos choice. Do update R to a current version if you aren't able to debug this yourself. Duncan Murdoch On 08/10/2020 12:38 p.m., Steven Yen wrote: Sorry Gentlemen and all. Now this is becoming a joke (to me). I repeated what I did earlier,

Re: [R] unable to access index for repository...

2020-10-08 Thread Steven Yen
Sorry Gentlemen and all. Now this is becoming a joke (to me). I repeated what I did earlier, with and without the option to set repos suggested by Duncan. Now it does not work. I wonder whether it is dependent on the mirror I chose, but I do not remember the one I chose earlier when it work.

Re: [R] Lahman Baseball Data Using R DBI Package

2020-10-08 Thread Bill Dunlap
This is really a feature of SQL, not R. SQL requires that you double quote column names that start with numbers, include spaces, etc., or that are SQL key words. E.g., > d <- data.frame(Order=c("sit","stay","heel"), Where=c("here","there","there"), From=c("me","me","you")) >

[R] RStudio question

2020-10-08 Thread Xavier Garcia via R-help
I'm solving the following problem: Create a variable (column) in the “wf” dataframe named “Zone” that takes value of “tropic” if Latitude is less than or equal to 30, or “non-tropic” for Latitude greater than 30. Show you Zone variable. Latitude is a column of my dataframe. I don't know the

Re: [R] unable to access index for repository...

2020-10-08 Thread Duncan Murdoch
Okay, so it's not an RStudio issue. However, I'd guess setting options(repos = "https://cran-archive.r-project.org;) at the start of your session could make everything work. (I'm guessing you currently have it set to "http://cran.rstudio.com;, which is the source of the last warning

Re: [R] unable to access index for repository...

2020-10-08 Thread Steven Yen
Thanks. You gentlemen please tell me what this means. In R (outside of RStudio) I ran: install.packages("aod") Received a warning (and installation did not seem to go through). Then I tried install.packages("aod",repos='https://cran-archive.r-project.org') Received a warning but it went on

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Jeremie Juste via ESS-help
Hello, On Thursday, 8 Oct 2020 at 09:05, Dirk Eddelbuettel via ESS-help wrote: > > Emacs is natural follow-up to this but there is _so much_ I wanted to cover > there that I am effectively overwhelmed and hence inactive. So let's turn > this upsite down and maybe _just_ focus on ESS. Shall we?

Re: [R] Installing Perl For Use in R

2020-10-08 Thread William Michels via R-help
Hi Philip, "Perl Download" https://www.perl.org/get.html The above link gives you the option to install from source or from ActiveState. The first link below (source) proudly proclaims, "Perl compiles on over 100 platforms..." and the second link below (binary) similarly proclaims, "Perl

Re: [R] unable to access index for repository...

2020-10-08 Thread Duncan Murdoch
Just remembered: RStudio runs its own wrapper around install.packages(). Steven, you should try doing the install from outside of RStudio, and see if it makes a difference. Duncan Murdoch On 08/10/2020 9:59 a.m., Duncan Murdoch wrote: He didn't specify the RStudio repos, though it's

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Tyler Smith via ESS-help
That sounds fun! I have pried myself away from your t4 videos this morning, but will look them over soon - they look great! Best, Tyler Dirk Eddelbuettel writes: On 8 October 2020 at 13:17, Ahmadou Dicko wrote: | I do agree with your suggestion. There is much more to ESS than I | know and

Re: [R] unable to plot bode - phase with control package

2020-10-08 Thread Jeff Newmiller
a) What is so difficult about the idea that this list is about R, not theory? There do exist forums about control theory (e.g. engineering.stackexchange.com) b) Using [-pi,+pi) is not "wrong"... it is numerically more precise, though it may not convey what you would prefer to convey. c) The

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Dirk Eddelbuettel via ESS-help
On 8 October 2020 at 13:17, Ahmadou Dicko wrote: | I do agree with your suggestion. There is much more to ESS than I | know and it would be great if we could pool our resources to improve | further. On 8 October 2020 at 09:38, Tyler Smith via ESS-help wrote: | I would also be interested in a

Re: [R] unable to access index for repository...

2020-10-08 Thread Duncan Murdoch
He didn't specify the RStudio repos, though it's probably implicitly specified in getOption("repos"). I wonder why install.packages() is looking there, when repos is given explicitly? On 08/10/2020 8:54 a.m., Uwe Ligges wrote: Drop the RStudio repos. Best, Uwe Ligges On 05.10.2020 11:10,

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Tyler Smith via ESS-help
I only update my package once or twice a year, and haven't created a new one in a while. That said, I really like the ESS/devtools integration. I usually have to dig into the docs to remind myself about `C-c C-o C-o` to get a new roxygen template, but that's much less effort than refreshing

[R] unable to plot bode - phase with control package

2020-10-08 Thread fr1d_mail via R-help
Dear All I hope my question is relevant on this forum, else very sorry for the disturbance I want to simply plot a bode diagram of a siso model using the 'bodeplot' command in the control package fail due to error in 'issiso' evaluation... Error in if (issiso(sys)) {: then I try by

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Ahmadou Dicko via ESS-help
I do agree with your suggestion. There is much more to ESS than I know and it would be great if we could pool our resources to improve further. For my part `ess-describe-object-at-point` really improved by workflow as it can be customized to include any function. Indeed, it would be great to pool

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Jeremie Juste via ESS-help
Hello Kasper, Thanks for sharing. > Personally, I'm a dinosaur so I'm still editing Rd files myself. I must > say, I'm not convinced about the merits of roxygen2. I admire your discipline. For my part, I feel that I would not document my functions properly unless I constrain myself to do it on

Re: [R] unable to access index for repository...

2020-10-08 Thread Uwe Ligges
Drop the RStudio repos. Best, Uwe Ligges On 05.10.2020 11:10, Steven Yen wrote: Thanks. I did as suggested but still received a warning, though the installation went through. Anything I could do to install without the warning message. What is the contrib.url argument? >

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Jeremie Juste via ESS-help
Hello Dirk, On Thursday, 8 Oct 2020 at 06:57, Dirk Eddelbuettel wrote: > We all may be a little different here. > > ESS now wraps around devtools, but my practices predate devtools. So I still > build, test, install, ... on the command-line for which I use wrappers (from > my littler package,

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Kasper Daniel Hansen via ESS-help
Personally, I'm a dinosaur so I'm still editing Rd files myself. I must say, I'm not convinced about the merits of roxygen2. Having said that, I think it would make a lot of sense to have robust solutions in ESS supporting roxygen2 and these may even exist somewhere. On Thu, Oct 8, 2020 at 1:57

Re: [ESS] Best Practice for building R packages

2020-10-08 Thread Dirk Eddelbuettel via ESS-help
On 8 October 2020 at 13:39, Jeremie Juste via ESS-help wrote: | Is anyone using ESS to build R packages? Could you share your workflow please? We all may be a little different here. ESS now wraps around devtools, but my practices predate devtools. So I still build, test, install, ... on the

[ESS] Best Practice for building R packages

2020-10-08 Thread Jeremie Juste via ESS-help
Hello, Is anyone using ESS to build R packages? Could you share your workflow please? I read the doc of ESS about using roxygen to document the functions. By the way it looks like the link to [1] roxygen is broken and that roxygen2 has taken its place. I initially thought that I could use