All,
I have a function to split a fixed rate bond into a floater/inverse floater
combination (something typically done in mortgage securtizations). The
function returns a list which serves as the deal structure over which principal
payment rules will iterate. However, I would like to call the
All,
I have the following to create a class PriceTypes. I use try catch on the
function and it gives me the error
price <- tryCatch(PriceTypes(price = "100")
,error = function(e) print(e)
,warning = function(w) print(w))
I read the section on tryCatch and withCallingHandlers as well the
All,
I have my tryCatch working on my function and rather than crashing I get the
error message below. However, I would just like price must be entered as a
character without the information to the right of the : Can this information be
suppressed?
Thanks,
Glenn
All,
My package is S4 an I would like to strongly type the input to the constructor
function. I understand from reading help etc that the call to new should be in
a function and the method initialize is only used when one would like to
customize the call to new or when the inputs are differen
/2016 1:55 PM, Glenn Schultz wrote:
| > All,
| > My package was not initially built with the rcpp use in mind. I have to
include C++ source code for a particular project so I will have edit the
description file add src files, etc. by hand. I an going over the rcpp
documentation now and rev
All,
My package was not initially built with the rcpp use in mind. I have to
include C++ source code for a particular project so I will have edit the
description file add src files, etc. by hand. I an going over the rcpp
documentation now and reviewing the R documentation on extensions as we
All,
My package has 5 directories which serve as data folders. I created source
scripts for MBS pass-throughs and UST bonds in the BondData folder rather than
create and store the objects as this makes it easier to add more bonds to the
example data set. I have a function called BondLabSet()
>
> This blog post by Jeff Allen is a nice write-up of what you're trying to do:
>
> http://trestletech.com/2013/04/package-wide-variablescache-in-r-package/
> <http://trestletech.com/2013/04/package-wide-variablescache-in-r-package/>
>
> -- Jenny
>
> > O
All,
I would like to have some inputs available to many functions. For example, I
have coefficient for a term structure fit which I would like to make a
available to total return functions. Thereby eliminating the need to fit the
same term structure over and over again. However, I still rea
All,
I am using optimx in my package to fit the term structure of interest rates.
When I call the function from the package I get the following error:
Error in optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, :
Cannot evaluate function at initial parameters
Called from: optimx.c
All,
My package BondLab is written in S4. I need to build recursive tree to create
human readable mortgage payment waterfalls in Bond Lab. I am simply asking if
the below idea is doable
The current waterfall implementation is a list of lists in a dataframe and
payment rules are iterated ove
All,
I have set-up both getters and setters for my package and everything works
great (just like BioConductor). Now, I would like to create new methods that
create graphs of cashflows and distributions of OAS simulations. My question is
this. Should the method call the constructor function an
your function in its own file as a test. Is other expected Rd
> documentation missing? As a last resort, I have had to set debug break points
> in roxygen2 functions, so I can see where it is failing.
>
> On Sunday, July 24, 2016, Glenn Schultz <mailto:glennmschu...@me.com>>
ageEffectiveMeasures-class.Rd', with the
> expected documentation?
>
> Everything looks fine for me with your example code in a dummy
> package, so if you're still seeing an issue you're going to need to
> share your package sources or an otherwise reproducib
use
> `@export` and roxygen2 will do the right thing, depending on what
> object you are trying to export.
>
> On Sun, Jul 24, 2016 at 10:35 AM, Glenn Schultz wrote:
>> All,
>>
>> I get the following warning using Roxygen2
>>
>> * checking f
All,
I get the following warning using Roxygen2
* checking for missing documentation entries ... WARNING
Undocumented S4 classes:
‘MortgageEffectiveMeasures’
The code to create and document the class is below
#' An S4 class MortgageEffectiveMeasures
#'
#' A class of mortgage effective
All,
My question is
ImportMethodsFrom package foo
-or-
ImportFrom package foo
Which is correct?
I have a package BondLab. I am creating new package which uses BondLab
classes, generics, and methods. The new package extends S4 classes to a S4 new
class. The getters are created per BioCondu
All,
I am creating getters and setters for my package which uses S4. To research
getters and setters, I have been looking at the bio conductor website and
documentation provided therein. I came up with the below as a getter for the
object PassThrough. This works PrepaidPrin(PassThrough).
l",
> "Formula", "Horizon",
> "KeyConvexity", "KeyRateDuration", "KeyRateTenor", "ModDuration", "Name",
> "PassThroughInterest", "Period", "PmtDate", "PrepaidPrin", "SMM"
All,
Below are two classes that I have created Scenario and Mtg.Scenario.
Mtg.Scenario contains Scenario when I run check I get the following warning.
I have gone through my book R Packages and looked at the EPub writing extension
but I cannot find an example.
Any help is appreciated
Glenn
*
; (unrelated: One experience from Bioconductor, is that it is good to have
> explicit constructors for S4 objects instead of using new("...").)
>
> Best,
> Kasper
>
> On Mon, Mar 28, 2016 at 2:09 PM, Glenn Schultz <mailto:glennmschu...@me.com>> wrote:
>
All,
I am creating a mortgage prepayment model package. The idea is to create a
class FRMModelFunction and each slot in the class is a function that may be use
in the prepayment. So I would like to create a generic and method that will
allow me to call the slot by name. However, I think that I
anced R' and
> 'R packages', both freely available online.
>
> This is the relevant section of the first book :
> http://adv-r.had.co.nz/OO-essentials.html
> <http://adv-r.had.co.nz/OO-essentials.html>
> This is the other book : http://r-pkgs.had.co.nz/ <htt
All,
I have a package with to S4 classes (MBSCashFlow, REMICCashFlow and
BondCashFlow) all of which contain the slot Duration. I would like have an
accessor Duration that would work on multiple signatures. Is this possible? I
have checked my books, help, BioConductor tutorials and it appears
All
I am not sure why I am getting this error and I cannot find anything on the net
other than try to restart R. I am
using Roxygen2 and it clearly says don't edit by hand at the top of the
namespace so I am stuck as what to do or look for.
Glenn
Error in namespaceExport(ns, exports) : undefi
Dec 20, 2015, at 01:37 PM, Hadley Wickham wrote:
You didn't include the NOTE you saw, and this isn't valid roxygen:
#' @imports methods::fields
So it's a bit hard to tell what the problem is.
Hadley
On Sun, Dec 20, 2015 at 12:02 PM, Glenn Schultz wrote:
Hello all,
I ne
Hello all,
I need some help understanding namespace and methods.
I received a note from RCMD imports methods fields...
I changed my file from
#' @import methods
NULL
to include the following:
#' @imports methods::fields
NULL
such that it now reads
#' @import methods
NULL
#' @imports method
Hello All,
When I build my package. I get the following warnings. I think these are
related to LaTex and ElCapitan but are flowing through to my R build. All the
tests pass and the help files work. These are just warnings but are
frustrating nonetheless.
Note: I just up graded to El Capit
All,
I have the following class with slots as functions. For the analysis of MBS
this is good set-up as it allows for a very clean and modular way of handling
things. My question is really geared to understanding what is happening in R.
Below is the function without sato = NULL R CMD throws a
I solved the problem. By copying the description file from the R library into
the project directory. Then everything started working
Glenn
Sent from my iPhone
> On Aug 30, 2015, at 1:55 AM, Uwe Ligges
> wrote:
>
>
>
>> On 30.08.2015 00:37, Glenn Schultz wrote:
&
Hi All,
I am getting an error that the build directory does not contain a description
file. But there is one in the directory. Everything was working fine until
this error. Any ideas how to fix it?
ERROR: The build directory does not contain a DESCRIPTION
file so cannot be built as a packag
Hello All,
The package that I am working no longer gives warnings upon closing connections
and syntax is used properly (and understood - thanks to all that answered my
questions). I have two questions regarding package documentation.
Any special considerations when creating multiple vignettes
Eddelbuettel wrote:
On 11 August 2015 at 02:09, Glenn Schultz wrote:
| All,
| Is my function just plain wrong or is it just programming style? I use
connections because SODA (software for data analysis) recommends using
connections when working with serialized files.
Nothing wrong with connections
t is considered "best practice"?
-Glenn
On Aug 09, 2015, at 09:04 AM, Joshua Ulrich wrote:
On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz wrote:
Hi All,
I use connections to open and close data folders needed by my package.
After each function closes I get the following warnings (depe
anism?
Hadley
On Sun, Aug 9, 2015 at 7:04 AM, Joshua Ulrich wrote:
On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz wrote:
Hi All,
I use connections to open and close data folders needed by my package.
After each function closes I get the following warnings (depending on the
connection that has been o
Hi Joshua, Thank-you.
I did not realize that the call to return closed the connection
-Glenn
> On Aug 9, 2015, at 9:04 AM, Joshua Ulrich wrote:
>
> On Sun, Aug 9, 2015 at 8:59 AM, Glenn Schultz wrote:
>> Hi All,
>>
>> I use connections to open and close data f
Hi All,
I use connections to open and close data folders needed by my package. After
each function closes I get the following warnings (depending on the connection
that has been opened).
10: closing unused connection 3
(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BondLab/
be
addressed. I am researching those.
Glenn
Sent from my iPhone
> On Aug 3, 2015, at 5:10 PM, Duncan Murdoch wrote:
>
>> On 03/08/2015 4:31 PM, Glenn Schultz wrote:
>> Hello All,
>>
>> I have a package which I would like to distribute. However, there are
Got it thanks - I want to achieve maximum exposure and transparency
Sent from my iPhone
> On Aug 3, 2015, at 5:10 PM, Duncan Murdoch wrote:
>
>> On 03/08/2015 4:31 PM, Glenn Schultz wrote:
>> Hello All,
>>
>> I have a package which I would like to distri
Hi Ben,
I get it thanks - feedback very helpful.
-Glenn
On Aug 03, 2015, at 06:06 PM, Ben Bolker wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 15-08-03 06:34 PM, Glenn Schultz wrote:
Hi Ben,
[Please keep the list cc'd in your replies.]
Thanks for answering so qu
Hello All,
I have a package which I would like to distribute. However, there are some
classes that are not exported if I provide a tar file can the user decompress
the tar to the source and then export class. I am thinking the answer is year
since the tar is source code. Conversely, a binar
Hi All,
I have a package stable and working. Now, I am trying to consolidate some
functions that share similar inputs. Example below. So, I branched on github
and work with the branch but now when I run the R check in studio I get the
following warning:
* checking Rd \usage sections ... WA
Hi All,
I am researching the criteria for submitting packages on the R website and
using Hadley's packages book as a general guide. The CRAN policy is that a
package cannot write files. My question is as follows:
Does this apply when the package is installed only? I ask because my package
43 matches
Mail list logo