[R-pkg-devel] run a function from a list

2017-05-27 Thread Glenn Schultz

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 functions as 
they drive the interest coupon payments.  I am using paste0() to piece together 
the function and I think the problem is the quotes but not sure.

I have tried source, do.call, list$foo(), list[[]]().  None of these have 
worked.  Any advice on structuring this problem is appreciated.

Thanks,
Glenn

structure(list(floater.balance = 30.78, floater.cap = 6.67, 
floater.floor = 0.3, floater.index = "1mLIBOR", floater.formula = "function(index){min(6.67,max((1mLIBOR+0.3)0.3))}", 
inverse.balance = 20.52, inverse.cap = 9.55, inverse.multipler = 1.5, 
inverse.floor = 0, inverse.floater.formula = "(function(index) {min(9.55,max((-1.5*1mLIBOR)+9.55,0))})"), .Names = c("floater.balance", 
"floater.cap", "floater.floor", "floater.index", "floater.formula", 
"inverse.balance", "inverse.cap", "inverse.multipler", "inverse.floor", 
"inverse.floater.formula"))





__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Package submission - Issue with pandoc in R CMD check

2017-05-27 Thread Emmanuel Blondel
Thanks Uwe for your clarifications. Can you let me know if i need to 
change something on my side, and/or resubmit the package to CRAN? (the 
warning on Pandoc was the only one) Thanks in advance


Best,
Emmanuel

Le 26/05/2017 à 00:11, Uwe Ligges a écrit :
This is currently under inspection by the CRAN team. Apparently 
img.shields.io have changed the cypher settings and pandoc fails with 
the new settings. We may have to disable *.md processing for some time.


Best,
Uwe Ligges



On 25.05.2017 20:59, Emmanuel Blondel wrote:

Dear all,

I've just submitted a new package named geometa, for which i received 
the message below. Indeed i had sent in my submission some question 
mark about the warning i obtain during R CMD check:


In case of R release and R devel, I got the following warning:

Conversion of 'README.md' failed:
pandoc.exe: Could not 
fetchhttps://img.shields.io/badge/Github-0.1--0-blue.svg

TlsExceptionHostPort (HandshakeFailed Error_EOF) "img.shields.io" 443

I've been looking for information about it, and it seems to be 
reported as bug of Pandoc. Same occur if I use an http link instead. 
I didn't find any successful alternative to remove this warning, and 
of course for this package and others i maintain, i would like to 
keep the 2 badges, 1 for CRAN and 1 for Github so user can quickly 
check if there is a pending revision in Github.


R CRAN checks links:
- old release:https://win-builder.r-project.org/GphApwuaD56b
- release:https://win-builder.r-project.org/maQicmvW941l
- devel:https://win-builder.r-project.org/OLSqwXd4W442

I would be very grateful if someone can shed light on this, and 
suggest a solution, so i could re-submit the package to CRAN.


Best regards
Emmanuel


 Message transf�r� 
Sujet : [CRAN-pretest-archived] CRAN submission geometa 0.1-0
Date : Thu, 25 May 2017 20:21:22 +0200
De : uwe.lig...@r-project.org
R�pondre � : c...@r-project.org
Pour : emmanuel.blond...@gmail.com
Copie � : c...@r-project.org



Dear maintainer,
   package geometa_0.1-0.tar.gz does not pass the incoming checks 
automatically, please see the pre-test at:
 


Status: 1 WARNING, 1 NOTE
   Please fix all problems and resubmit a fixed version via the webform.
If you are not sure how to fix the problems shown, please ask for 
help on the R-package-devel mailing list:


If you are fairly certain the rejection is a false positive, please 
reply-all to this message and explain.

   More details are given in the directory:
 


The files will be removed after roughly 7 days.
  Best regards,
CRAN teams' auto-check service


[[alternative HTML version deleted]]



__
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] Package submission - Issue with pandoc in R CMD check

2017-05-27 Thread Uwe Ligges

For geometa:

If you resubmit without the access to "img.shields.io", we can publish 
now. Otherweise, as we have not yet managed to get a univesally working 
pandoc on the CRAN master, we cannot publish your package yet.


Best,
Uwe Ligges





On 27.05.2017 16:20, Emmanuel Blondel wrote:
Thanks Uwe for your clarifications. Can you let me know if i need to 
change something on my side, and/or resubmit the package to CRAN? (the 
warning on Pandoc was the only one) Thanks in advance


Best,
Emmanuel

Le 26/05/2017 à 00:11, Uwe Ligges a écrit :
This is currently under inspection by the CRAN team. Apparently 
img.shields.io have changed the cypher settings and pandoc fails with 
the new settings. We may have to disable *.md processing for some time.


Best,
Uwe Ligges



On 25.05.2017 20:59, Emmanuel Blondel wrote:

Dear all,

I've just submitted a new package named geometa, for which i received 
the message below. Indeed i had sent in my submission some question 
mark about the warning i obtain during R CMD check:


In case of R release and R devel, I got the following warning:

Conversion of 'README.md' failed:
pandoc.exe: Could not 
fetchhttps://img.shields.io/badge/Github-0.1--0-blue.svg

TlsExceptionHostPort (HandshakeFailed Error_EOF) "img.shields.io" 443

I've been looking for information about it, and it seems to be 
reported as bug of Pandoc. Same occur if I use an http link instead. 
I didn't find any successful alternative to remove this warning, and 
of course for this package and others i maintain, i would like to 
keep the 2 badges, 1 for CRAN and 1 for Github so user can quickly 
check if there is a pending revision in Github.


R CRAN checks links:
- old release:https://win-builder.r-project.org/GphApwuaD56b
- release:https://win-builder.r-project.org/maQicmvW941l
- devel:https://win-builder.r-project.org/OLSqwXd4W442

I would be very grateful if someone can shed light on this, and 
suggest a solution, so i could re-submit the package to CRAN.


Best regards
Emmanuel


 Message transf�r� 
Sujet : [CRAN-pretest-archived] CRAN submission geometa 0.1-0
Date : Thu, 25 May 2017 20:21:22 +0200
De : uwe.lig...@r-project.org
R�pondre � : c...@r-project.org
Pour : emmanuel.blond...@gmail.com
Copie � : c...@r-project.org



Dear maintainer,
   package geometa_0.1-0.tar.gz does not pass the incoming checks 
automatically, please see the pre-test at:
 


Status: 1 WARNING, 1 NOTE
   Please fix all problems and resubmit a fixed version via the webform.
If you are not sure how to fix the problems shown, please ask for 
help on the R-package-devel mailing list:


If you are fairly certain the rejection is a false positive, please 
reply-all to this message and explain.

   More details are given in the directory:
 


The files will be removed after roughly 7 days.
  Best regards,
CRAN teams' auto-check service


[[alternative HTML version deleted]]



__
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] Package submission - Issue with pandoc in R CMD check

2017-05-27 Thread Spencer Graves



On 2017-05-27 9:25 AM, Uwe Ligges wrote:

For geometa:

If you resubmit without the access to "img.shields.io", we can publish 
now. Otherweise, as we have not yet managed to get a univesally 
working pandoc on the CRAN master, we cannot publish your package yet.



Uwe:


  Might it be appropriate to wrap anything that uses 
"img.shields.io" in "if(!fda::CRAN())" in all the relevant *.Rd files -- 
with appropriate error messages in functions that use "img.shields.io"?



  Thanks, Spencer



Best,
Uwe Ligges





On 27.05.2017 16:20, Emmanuel Blondel wrote:
Thanks Uwe for your clarifications. Can you let me know if i need to 
change something on my side, and/or resubmit the package to CRAN? 
(the warning on Pandoc was the only one) Thanks in advance


Best,
Emmanuel

Le 26/05/2017 à 00:11, Uwe Ligges a écrit :
This is currently under inspection by the CRAN team. Apparently 
img.shields.io have changed the cypher settings and pandoc fails 
with the new settings. We may have to disable *.md processing for 
some time.


Best,
Uwe Ligges



On 25.05.2017 20:59, Emmanuel Blondel wrote:

Dear all,

I've just submitted a new package named geometa, for which i 
received the message below. Indeed i had sent in my submission some 
question mark about the warning i obtain during R CMD check:


In case of R release and R devel, I got the following warning:

Conversion of 'README.md' failed:
pandoc.exe: Could not 
fetchhttps://img.shields.io/badge/Github-0.1--0-blue.svg

TlsExceptionHostPort (HandshakeFailed Error_EOF) "img.shields.io" 443

I've been looking for information about it, and it seems to be 
reported as bug of Pandoc. Same occur if I use an http link 
instead. I didn't find any successful alternative to remove this 
warning, and of course for this package and others i maintain, i 
would like to keep the 2 badges, 1 for CRAN and 1 for Github so 
user can quickly check if there is a pending revision in Github.


R CRAN checks links:
- old release:https://win-builder.r-project.org/GphApwuaD56b
- release:https://win-builder.r-project.org/maQicmvW941l
- devel:https://win-builder.r-project.org/OLSqwXd4W442

I would be very grateful if someone can shed light on this, and 
suggest a solution, so i could re-submit the package to CRAN.


Best regards
Emmanuel


 Message transf�r� 
Sujet : [CRAN-pretest-archived] CRAN submission geometa 0.1-0
Date : Thu, 25 May 2017 20:21:22 +0200
De : uwe.lig...@r-project.org
R�pondre � : c...@r-project.org
Pour : emmanuel.blond...@gmail.com
Copie � : c...@r-project.org



Dear maintainer,
   package geometa_0.1-0.tar.gz does not pass the incoming checks 
automatically, please see the pre-test at:
 


Status: 1 WARNING, 1 NOTE
   Please fix all problems and resubmit a fixed version via the 
webform.
If you are not sure how to fix the problems shown, please ask for 
help on the R-package-devel mailing list:


If you are fairly certain the rejection is a false positive, please 
reply-all to this message and explain.

   More details are given in the directory:
 


The files will be removed after roughly 7 days.
  Best regards,
CRAN teams' auto-check service


[[alternative HTML version deleted]]



__
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


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] run a function from a list

2017-05-27 Thread Iñaki Úcar
Hi Glenn,

Try this:

my_list <- list(func = eval(parse(text=paste0("function()",
"print('this is a function')"
my_list$func()
#> "this is a function"

Regards,
Iñaki

2017-05-27 14:49 GMT+02:00 Glenn Schultz :
> 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
> functions as they drive the interest coupon payments.  I am using paste0()
> to piece together the function and I think the problem is the quotes but not
> sure.
>
> I have tried source, do.call, list$foo(), list[[]]().  None of these have
> worked.  Any advice on structuring this problem is appreciated.
>
> Thanks,
> Glenn
>
> structure(list(floater.balance = 30.78, floater.cap = 6.67,
> floater.floor = 0.3, floater.index = "1mLIBOR", floater.formula =
> "function(index){min(6.67,max((1mLIBOR+0.3)0.3))}", inverse.balance = 20.52,
> inverse.cap = 9.55, inverse.multipler = 1.5, inverse.floor = 0,
> inverse.floater.formula = "(function(index)
> {min(9.55,max((-1.5*1mLIBOR)+9.55,0))})"), .Names = c("floater.balance",
> "floater.cap", "floater.floor", "floater.index", "floater.formula",
> "inverse.balance", "inverse.cap", "inverse.multipler", "inverse.floor",
> "inverse.floater.formula"))
>
>
>
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



-- 
Iñaki Úcar
http://www.enchufa2.es
@Enchufa2

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] Package submission - Issue with pandoc in R CMD check

2017-05-27 Thread Uwe Ligges



On 27.05.2017 16:37, Spencer Graves wrote:



On 2017-05-27 9:25 AM, Uwe Ligges wrote:

For geometa:

If you resubmit without the access to "img.shields.io", we can publish 
now. Otherweise, as we have not yet managed to get a univesally 
working pandoc on the CRAN master, we cannot publish your package yet.



Uwe:


   Might it be appropriate to wrap anything that uses 
"img.shields.io" in "if(!fda::CRAN())" in all the relevant *.Rd files -- 
with appropriate error messages in functions that use "img.shields.io"?


As I said previously: "This is currently under inspection by the CRAN 
team."
We really need to investigate this carefully, including options that we 
have to keep the system running with minimal efforts for both the CRAN 
team and hundreds of maintainers who are using "img.shields.io".



Note that the functions fda::CRAN() will not identoify the CRAN master 
to be CRAN as we do not run checks there and pandoc and "img.shields.io" 
is frequently needed for Readme.md conversions.


So just give us a week or two...

Best,
Uwe Ligges





   Thanks, Spencer



Best,
Uwe Ligges





On 27.05.2017 16:20, Emmanuel Blondel wrote:
Thanks Uwe for your clarifications. Can you let me know if i need to 
change something on my side, and/or resubmit the package to CRAN? 
(the warning on Pandoc was the only one) Thanks in advance


Best,
Emmanuel

Le 26/05/2017 à 00:11, Uwe Ligges a écrit :
This is currently under inspection by the CRAN team. Apparently 
img.shields.io have changed the cypher settings and pandoc fails 
with the new settings. We may have to disable *.md processing for 
some time.


Best,
Uwe Ligges



On 25.05.2017 20:59, Emmanuel Blondel wrote:

Dear all,

I've just submitted a new package named geometa, for which i 
received the message below. Indeed i had sent in my submission some 
question mark about the warning i obtain during R CMD check:


In case of R release and R devel, I got the following warning:

Conversion of 'README.md' failed:
pandoc.exe: Could not 
fetchhttps://img.shields.io/badge/Github-0.1--0-blue.svg

TlsExceptionHostPort (HandshakeFailed Error_EOF) "img.shields.io" 443

I've been looking for information about it, and it seems to be 
reported as bug of Pandoc. Same occur if I use an http link 
instead. I didn't find any successful alternative to remove this 
warning, and of course for this package and others i maintain, i 
would like to keep the 2 badges, 1 for CRAN and 1 for Github so 
user can quickly check if there is a pending revision in Github.


R CRAN checks links:
- old release:https://win-builder.r-project.org/GphApwuaD56b
- release:https://win-builder.r-project.org/maQicmvW941l
- devel:https://win-builder.r-project.org/OLSqwXd4W442

I would be very grateful if someone can shed light on this, and 
suggest a solution, so i could re-submit the package to CRAN.


Best regards
Emmanuel


 Message transf�r� 
Sujet : [CRAN-pretest-archived] CRAN submission geometa 0.1-0
Date : Thu, 25 May 2017 20:21:22 +0200
De : uwe.lig...@r-project.org
R�pondre � : c...@r-project.org
Pour : emmanuel.blond...@gmail.com
Copie � : c...@r-project.org



Dear maintainer,
   package geometa_0.1-0.tar.gz does not pass the incoming checks 
automatically, please see the pre-test at:
 


Status: 1 WARNING, 1 NOTE
   Please fix all problems and resubmit a fixed version via the 
webform.
If you are not sure how to fix the problems shown, please ask for 
help on the R-package-devel mailing list:


If you are fairly certain the rejection is a false positive, please 
reply-all to this message and explain.

   More details are given in the directory:
 


The files will be removed after roughly 7 days.
  Best regards,
CRAN teams' auto-check service


[[alternative HTML version deleted]]



__
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


__
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] Package submission - Issue with pandoc in R CMD check

2017-05-27 Thread Emmanuel Blondel
Dear Uwe, i clearly understand the CRAN team needs time on this. I have 
no problem in postponing on my side, and resubmit later next month. 
Thanks & best regards


Le 27/05/2017 à 16:25, Uwe Ligges a écrit :
> For geometa:
>
> If you resubmit without the access to "img.shields.io", we can publish 
> now. Otherweise, as we have not yet managed to get a univesally 
> working pandoc on the CRAN master, we cannot publish your package yet.
>
> Best,
> Uwe Ligges
>
>
>
>
>
> On 27.05.2017 16:20, Emmanuel Blondel wrote:
>> Thanks Uwe for your clarifications. Can you let me know if i need to 
>> change something on my side, and/or resubmit the package to CRAN? 
>> (the warning on Pandoc was the only one) Thanks in advance
>>
>> Best,
>> Emmanuel
>>
>> Le 26/05/2017 à 00:11, Uwe Ligges a écrit :
>>> This is currently under inspection by the CRAN team. Apparently 
>>> img.shields.io have changed the cypher settings and pandoc fails 
>>> with the new settings. We may have to disable *.md processing for 
>>> some time.
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>>
>>> On 25.05.2017 20:59, Emmanuel Blondel wrote:
 Dear all,

 I've just submitted a new package named geometa, for which i 
 received the message below. Indeed i had sent in my submission some 
 question mark about the warning i obtain during R CMD check:

 In case of R release and R devel, I got the following warning:

 Conversion of 'README.md' failed:
 pandoc.exe: Could not 
 fetchhttps://img.shields.io/badge/Github-0.1--0-blue.svg
 TlsExceptionHostPort (HandshakeFailed Error_EOF) "img.shields.io" 443

 I've been looking for information about it, and it seems to be 
 reported as bug of Pandoc. Same occur if I use an http link 
 instead. I didn't find any successful alternative to remove this 
 warning, and of course for this package and others i maintain, i 
 would like to keep the 2 badges, 1 for CRAN and 1 for Github so 
 user can quickly check if there is a pending revision in Github.

 R CRAN checks links:
 - old release:https://win-builder.r-project.org/GphApwuaD56b
 - release:https://win-builder.r-project.org/maQicmvW941l
 - devel:https://win-builder.r-project.org/OLSqwXd4W442

 I would be very grateful if someone can shed light on this, and 
 suggest a solution, so i could re-submit the package to CRAN.

 Best regards
 Emmanuel


  Message transf�r� 
 Sujet : [CRAN-pretest-archived] CRAN submission geometa 0.1-0
 Date : Thu, 25 May 2017 20:21:22 +0200
 De : uwe.lig...@r-project.org
 R�pondre � : c...@r-project.org
 Pour : emmanuel.blond...@gmail.com
 Copie � : c...@r-project.org



 Dear maintainer,
package geometa_0.1-0.tar.gz does not pass the incoming checks 
 automatically, please see the pre-test at:
 
  

 Status: 1 WARNING, 1 NOTE
Please fix all problems and resubmit a fixed version via the 
 webform.
 If you are not sure how to fix the problems shown, please ask for 
 help on the R-package-devel mailing list:
 
 If you are fairly certain the rejection is a false positive, please 
 reply-all to this message and explain.
More details are given in the directory:
 
  

 The files will be removed after roughly 7 days.
   Best regards,
 CRAN teams' auto-check service


 [[alternative HTML version deleted]]



 __
 R-package-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-package-devel

>>

-- 
*Emmanuel Blondel*
International Consultant | CEO
/Geographic Information Systems in Agronomy, Environment, Fishery & 
Marine Sciences/
41, Avenue du Vacayrial
81370 Saint Sulpice la Pointe, France
Tel: +33 (0) 6 45 97 87 52
Website: http://eblondel.github.io 
Email: emmanuel.blond...@gmail.com 

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel