James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
124 stars 54 forks source link

add function to give current cpp version #79

Closed wStockhausen closed 6 years ago

wStockhausen commented 6 years ago

It would be helpful to add a function that would give a character version of the current (latest) version of the cpp code, because it is a little hard to find (I originally thought it was the same as the version for VAST, but I eventually found it by looking in the "inst" directory under the package directory).

James-Thorson commented 6 years ago

A little investigation suggests that package semver is a good place to start for a function doing this, but it would need to be called from a wrapper function that (1) knows where to look for functions and (2) knows to strip off characters before the first number. Anyway, I might take a crack at this later, although its not the top of the list

wStockhausen commented 6 years ago

Was just thinking it'd be something like getVersion<-function(return("VAST_v4_0_0");)and you'd just update the character string when you came out with a new cpp version. Course it would be simpler to maintain if you could write the code to do it automagically.

Buck


On Tue, Jan 30, 2018 at 9:43 PM, Jim Thorson notifications@github.com wrote:

A little investigation suggests that package semver is a good place to start for a function doing this, but it would need to be called from a wrapper function that (1) knows where to look for functions and (2) knows to strip off characters before the first number. Anyway, I might take a crack at this later, although its not the top of the list

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James-Thorson/VAST/issues/79#issuecomment-361830267, or mute the thread https://github.com/notifications/unsubscribe-auth/AFgB9HxbDBmbmc8jx05uHd03qhPznI26ks5tP_2EgaJpZM4Ry9r- .

James-Thorson commented 6 years ago

now added, see response to #30