Re: [R-pkg-devel] Namespace error
It's difficult to tell without seeing the source code, but the NAMESPACE you posted doesn't seem to contain "View". This file usually gets updated when you call devtools::document() or roxygen2::roxygenize(). What happens if you run one of these functions? -Kirill On 16.02.2016 18:14, Glenn Schultz wrote: 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) : undefined exports: View Error: package or namespace load failed for ‘BondLab’ Execution halted * checking whether the namespace can be loaded with stated dependencies ... WARNING Error in namespaceExport(ns, exports) : undefined exports: View Calls: loadNamespace ... namespaceImportFrom -> asNamespace -> loadNamespace -> namespaceExport Execution halted A namespace must be able to be loaded with just the base namespace loaded: otherwise if the namespace gets loaded by a saved object, the session will be unable to start. Probably some imports need to be declared in the NAMESPACE file. * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... NOTE Error: package or namespace load failed for ‘BondLab’ Call sequence: 2: stop(gettextf("package or namespace load failed for %s", sQuote(package)), call. = FALSE, domain = NA) Here is my namespace: # Generated by roxygen2: do not edit by hand export(AtomsData) export(BeginBal) export(Bond) export(BondAnalytics) export(BondBasisConversion) export(BondCashFlows) export(CDR.To.MDR) export(CIRBondPrice) export(CIRSim) export(CPR.To.SMM) export(CalibrateCIR) export(CashFlowTable) export(CollateralGroup) export(CusipRecord) export(DollarRoll) export(DollarRollAnalytics) export(Effective.Convexity) export(Effective.Duration) export(Effective.Measure) export(EndingBal) export(EstimYTM) export(Forward.Rate) export(ForwardPassThrough) export(HPISim) export(Interest) export(MBS) export(MakeBondDetails) export(MakeCollateral) export(MakeMBSDetails) export(MakeModelTune) export(MakeRAID) export(MakeRDME) export(MakeScenario) export(MakeSchedule) export(MakeTranche) export(ModelTune) export(Mortgage.Monthly.Payment) export(Mortgage.OAS) export(MortgageCashFlow) export(MortgageCashFlowArray) export(MortgageCashFlow_Array) export(MortgageRate) export(Mtg.Scenario) export(MtgRate) export(MtgTermStructure) export(PPC.Ramp) export(PassThroughOAS) export(PaymentDate) export(PrepaymentAssumption) export(RDMEData) export(RDMEFactor) export(REMICDeal) export(REMICGroupConn) export(REMICSchedules) export(REMICWaterFall) export(Rates) export(ReadRAID) export(Remain.Balance) export(RemicStructure) export(SMM.To.CPR) export(SMMVector.To.CPR) export(SaveCollGroup) export(SaveMBS) export(SaveModelTune) export(SaveRAID) export(SaveRDME) export(SaveREMIC) export(SaveScenario) export(SaveSchedules) export(SaveTranche) export(SaveTranches) export(ScenarioCall) export(Sched.Prin) export(SwapRateData) export(TermStructure) export(TimeValue) export(Tranches) export(ULTV) export(bondprice) exportClasses(AtomsAnalytics) exportClasses(AtomsData) exportClasses(AtomsScenario) exportClasses(BondCashFlows) exportClasses(BondDetails) exportClasses(BondTermStructure) exportClasses(MBSDetails) exportClasses(TermStructure) import(data.tree) import(methods) import(optimx) importFrom(lubridate,"%m+%") importFrom(lubridate,day) importFrom(lubridate,month) importFrom(lubridate,year) importFrom(lubridate,years) importFrom(termstrc,create_cashflows_matrix) importFrom(termstrc,create_maturities_matrix) importFrom(termstrc,estim_cs) importFrom(termstrc,estim_nss) importFrom(termstrc,forwardrates) importFrom(termstrc,spotrates) __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Namespace error
On 17 Feb 2016, at 10:25 , Gábor Csárdiwrote: > On Wed, Feb 17, 2016 at 1:04 AM, Duncan Murdoch > wrote: >> On 16/02/2016 12:14 PM, Glenn Schultz wrote: >>> >>> 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. >> >> >> You will need to contact the Roxygen2 maintainers about this. We don't >> support it. > > So, this mailing list is about developing packages using base R > packages only and exclusively? > > I suggest that the owners clarify this on the "about" page, because I > totally missed it, and almost answered this question. :) Well, by all means, then It's like r-help. Sometimes a question seems better directed at RStudio support or the platform specific mailing lists, and people get redirected, but hey, we're supposed to be friendly in here, so if you happen to know the answer, just tell. (The list was mainly set up to facilitate issues between CRAN and package maintainers, so the expertise that you can assume to be present is that of people who know why CRAN is being picky, etc. There's little point in keeping the expertise of others out, but there's a blurry line towards doing 3rd party maintainers' work for them.) -pd > > Gabor > >> Duncan Murdoch > [...] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Namespace error
On Wed, Feb 17, 2016 at 1:04 AM, Duncan Murdochwrote: > On 16/02/2016 12:14 PM, Glenn Schultz wrote: >> >> 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. > > > You will need to contact the Roxygen2 maintainers about this. We don't > support it. So, this mailing list is about developing packages using base R packages only and exclusively? I suggest that the owners clarify this on the "about" page, because I totally missed it, and almost answered this question. :) Gabor > Duncan Murdoch [...] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Namespace error
On 16/02/2016 12:14 PM, Glenn Schultz wrote: 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. You will need to contact the Roxygen2 maintainers about this. We don't support it. Duncan Murdoch Glenn Error in namespaceExport(ns, exports) : undefined exports: View Error: package or namespace load failed for ‘BondLab’ Execution halted * checking whether the namespace can be loaded with stated dependencies ... WARNING Error in namespaceExport(ns, exports) : undefined exports: View Calls: loadNamespace ... namespaceImportFrom -> asNamespace -> loadNamespace -> namespaceExport Execution halted A namespace must be able to be loaded with just the base namespace loaded: otherwise if the namespace gets loaded by a saved object, the session will be unable to start. Probably some imports need to be declared in the NAMESPACE file. * checking whether the namespace can be unloaded cleanly ... OK * checking dependencies in R code ... NOTE Error: package or namespace load failed for ‘BondLab’ Call sequence: 2: stop(gettextf("package or namespace load failed for %s", sQuote(package)), call. = FALSE, domain = NA) Here is my namespace: # Generated by roxygen2: do not edit by hand export(AtomsData) export(BeginBal) export(Bond) export(BondAnalytics) export(BondBasisConversion) export(BondCashFlows) export(CDR.To.MDR) export(CIRBondPrice) export(CIRSim) export(CPR.To.SMM) export(CalibrateCIR) export(CashFlowTable) export(CollateralGroup) export(CusipRecord) export(DollarRoll) export(DollarRollAnalytics) export(Effective.Convexity) export(Effective.Duration) export(Effective.Measure) export(EndingBal) export(EstimYTM) export(Forward.Rate) export(ForwardPassThrough) export(HPISim) export(Interest) export(MBS) export(MakeBondDetails) export(MakeCollateral) export(MakeMBSDetails) export(MakeModelTune) export(MakeRAID) export(MakeRDME) export(MakeScenario) export(MakeSchedule) export(MakeTranche) export(ModelTune) export(Mortgage.Monthly.Payment) export(Mortgage.OAS) export(MortgageCashFlow) export(MortgageCashFlowArray) export(MortgageCashFlow_Array) export(MortgageRate) export(Mtg.Scenario) export(MtgRate) export(MtgTermStructure) export(PPC.Ramp) export(PassThroughOAS) export(PaymentDate) export(PrepaymentAssumption) export(RDMEData) export(RDMEFactor) export(REMICDeal) export(REMICGroupConn) export(REMICSchedules) export(REMICWaterFall) export(Rates) export(ReadRAID) export(Remain.Balance) export(RemicStructure) export(SMM.To.CPR) export(SMMVector.To.CPR) export(SaveCollGroup) export(SaveMBS) export(SaveModelTune) export(SaveRAID) export(SaveRDME) export(SaveREMIC) export(SaveScenario) export(SaveSchedules) export(SaveTranche) export(SaveTranches) export(ScenarioCall) export(Sched.Prin) export(SwapRateData) export(TermStructure) export(TimeValue) export(Tranches) export(ULTV) export(bondprice) exportClasses(AtomsAnalytics) exportClasses(AtomsData) exportClasses(AtomsScenario) exportClasses(BondCashFlows) exportClasses(BondDetails) exportClasses(BondTermStructure) exportClasses(MBSDetails) exportClasses(TermStructure) import(data.tree) import(methods) import(optimx) importFrom(lubridate,"%m+%") importFrom(lubridate,day) importFrom(lubridate,month) importFrom(lubridate,year) importFrom(lubridate,years) importFrom(termstrc,create_cashflows_matrix) importFrom(termstrc,create_maturities_matrix) importFrom(termstrc,estim_cs) importFrom(termstrc,estim_nss) importFrom(termstrc,forwardrates) importFrom(termstrc,spotrates) __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel