[R] Lubridate and NameSpace

Glenn Schultz glennmschultz at me.com
Sat Feb 28 18:25:09 CET 2015


Hello All,

I am working on a package very near completion - roxygenizing it now.  The namespace imports from lubridate importFrom(lubridate,"%m+%").  The problem is:

Lubridate will not load with bondlab, I have to manually click on lubridate in R Studio to load it
I tried calling function using lubridate:::%m+% within my function based on some discussion I found online.  This is likely the correct idea but I don't think I am calling the function correctly since it does not work in the code when I use the above syntax.
Any suggestions are appreciated>

Best Glenn 

The description file is as follows: 

Package: BondLab
Type: Package
Title: A package for the analysis of structured products
Version: 0.0.0
Date: 2013-12-08
Author: Glenn Schultz, CFA
Maintainer: Glenn Schultz <glennmschultz at me.com>
Description: The package provides a suite of software utilities for the analysis of Mortgage and Asset Backed securities
LazyLoad: yes
License: GPL(>=3.0)
Imports:  termstrc, 
          lubridate, 
          methods, 
          optimx,
Suggests: knitr,
          devtools,
          testthat
VignetteBuilder: knitr

The Namespace is as follows:
# Generated by roxygen2 (4.1.0): do not edit by hand

export(CPR.To.SMM)
export(DollarRoll)
export(Effective.Convexity)
export(Effective.Duration)
export(EstimYTM)
export(MakeScenario)
export(Mortgage.Monthly.Payment)
export(MortgageCashFlow)
export(PPC.Ramp)
export(PassThroughAnalytics)
export(PassThroughOAS)
export(Rates)
export(Remain.Balance)
export(SMM.To.CPR)
export(SMMVector.To.CPR)
export(Sched.Prin)
export(TermStructure)
export(TimeValue)
export(bondprice)
import(methods)
import(optimx)
importFrom(lubridate,"%m+%")
importFrom(termstrc,create_cashflows_matrix)
importFrom(termstrc,create_maturities_matrix)
importFrom(termstrc,estim_cs)
importFrom(termstrc,estim_nss)
importFrom(termstrc,forwardrates)
importFrom(termstrc,spotrates)




More information about the R-help mailing list