Re: [R] Code works on Mac but not Windows

2015-05-13 Thread Thierry Onkelinx
Yes > bar <- function(y = "12345"){ + message(y) + } > foo <- function(x = "a", y = "b"){ + bar(y = y) + } > bar() 12345 > bar(y = "abc") abc > foo() b > foo(y = "xyz") xyz ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie &

Re: [R] Code works on Mac but not Windows

2015-05-13 Thread Thierry Onkelinx
Dear Glenn, Please keep the mailing list in cc. In this case I would drop the "signature" like values and use correct defaults. TermStructure <- function(rates.data, method = "ns") you can drop if(missing(method)) method = "ns" in that case. Best regards, ir. Thierry Onkelinx Instituut voor n

Re: [R] Code works on Mac but not Windows

2015-05-12 Thread Thierry Onkelinx
Dear Glenn, I think that you are confusing the signature of a method and the default values of of function. It looks like you want the signature(rates.data = "character", method = "character"). But you are setting "character" as default value of both function arguments. Since you define a default

Re: [R] Code works on Mac but not Windows

2015-05-11 Thread Henrik Bengtsson
Before blaming Windows and/or OS X, make sure you verify the behavior on the exact same versions of R; it might be due to difference in R versions. If you're luck it's a bug that has been fixed and your problems goes away after updating. This is why folks on this lists are repeatable requesting t

Re: [R] Code works on Mac but not Windows

2015-05-11 Thread Glenn Schultz
Hi Thierry, Below is the function setMethod("initialize", signature("TermStructure"), function(.Object,..., tradedate = "character", period = "numeric", date = "character", spotrate = "numeric",

Re: [R] Code works on Mac but not Windows

2015-05-10 Thread Thierry Onkelinx
Dear Glenn, We need more details on the function. Please provide a commented, minimal, self-contained version of the function that reproduces the problem (as the posting guide asks you to do). Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Natu

[R] Code works on Mac but not Windows

2015-05-10 Thread Glenn Schultz
Hello All, Testing my code on a Windows based machine today.  There seems to be an offending line of code.  I have pasted it below.  Basically, I check to see if the user passed a fit method to TermStructure and if not then default to "ns".   The above works fine on my Mac but a windows build