Re: [R] Risks of using "function <- package::function" ?

2017-11-16 Thread Jeff Newmiller
Obvious? How about "obscurity"? Just directly use pkg::fun if you have name collision. -- Sent from my phone. Please excuse my brevity. On November 16, 2017 4:46:15 PM PST, Duncan Murdoch wrote: >On 16/11/2017 4:53 PM, Boris Steipe wrote: >> Large packages sometimes mask each other's functio

[R] 'fractal' package

2017-11-16 Thread David Paul
https://rdrr.io/rforge/fractal/ https://cran.r-project.org/web/packages/fractal/fractal.pdf Hi, I am trying to learn about nonlinear time series, and fractal time series analysis in particular. I am interested in becoming proficient with the 'fractal' package. I have two specific que

Re: [R] Risks of using "function <- package::function" ?

2017-11-16 Thread Duncan Murdoch
On 16/11/2017 4:53 PM, Boris Steipe wrote: Large packages sometimes mask each other's functions and that creates a headache, especially for teaching code, since function signatures may depend on which order packages were loaded in. One of my students proposed using the idiom <- :: ... in

Re: [R] Convert poly line to polygon in R

2017-11-16 Thread MacQueen, Don
In addition to which, the rgeos package may have something. If it's just a single polyline, it may be pretty easy to pull out the coordinates as a two column matrix, append the first row at the end, and rebuild it as a polygon. The readOGR function in the rgdal package is probably a better ch

[R] Risks of using "function <- package::function" ?

2017-11-16 Thread Boris Steipe
Large packages sometimes mask each other's functions and that creates a headache, especially for teaching code, since function signatures may depend on which order packages were loaded in. One of my students proposed using the idiom <- :: ... in a preamble, when we use just a small subset of

Re: [R] error message for function: lmer (from lme4 package)

2017-11-16 Thread Fix Ace via R-help
Hi, Bert, Thank you very much for the comments and suggestions! Ace On Wednesday, November 15, 2017 10:44 AM, Bert Gunter wrote: Always cc the list, which I have done here. I am not a (free) private consultant, nor do I have all the answers. Based on what you sent me, which is not wha

Re: [R] Yield-to-Maturity problem

2017-11-16 Thread Marc Schwartz
Hi, Another resource would be R-SIG-Finance, which is an R e-mail list focused in this domain: https://stat.ethz.ch/mailman/listinfo/r-sig-finance as well as the Finance Task View: https://cran.r-project.org/web/views/Finance.html

Re: [R] Yield-to-Maturity problem

2017-11-16 Thread peter dalgaard
This isn't all that likely to be homework, Bert However, Alexander, you may find that not many readers are familiar with YTM concepts. There's a chapter with R examples in Ruppert+Matteson's book (if you have SpringerLink, you may be able to download for free). Otherwise you could try sea

Re: [R] ks.test() with 2 samples vs. 1 sample an distr. function

2017-11-16 Thread peter dalgaard
I suspect that that reply just replicates the question. There are two issues: The distribution of the test statistic is different, which may be unsurprising. However, the test statistic itself is also different which may be a bit more subtle. It may help to plot(ecdf(xi)) and similarly x. The

Re: [R] Yield-to-Maturity problem

2017-11-16 Thread Bert Gunter
This list has a no homework policy. Also, please read the posting guidebelow to learn what sorts of posts are legitimate and how to post. Note: plain text , not html, which often gets mangked by the server. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep com

[R] Yield-to-Maturity problem

2017-11-16 Thread Alexander Bergmüller
Hello everybody, I am not very advanced in my R skills so I really hope anybody of you can help me with this problem on which I have been working for hours. I would like to write a function, which can guess the yield-to-maturity for any values: C, NV, r, s1, s2, and for a freely chosen toleranc

Re: [R] R6 object that is a list of referenced object

2017-11-16 Thread Eric Berger
Hi Cristina, You can try this: > Community <- R6Class("Community", public = list( e = NULL, initialize = function() { self$e <- list() }, add = function( person ) { self$e[[ length(self$e) + 1]] <<- p