Git Product home page Git Product logo

bsam's People

Contributors

ianjonsen avatar mdsumner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bsam's Issues

Error when using fit_ssm

I tried using the fit_ssm function on my data, which has been changed to fit the requirements of this function, and it came up with this error:

Error: Can't join on x$lc x y$lc because of incompatible types.
i x$lc is of type <ordered>>.
i y$lc is of type <ordered<3e9dd>>>.

After trying a few changes in my data, I kept getting the same error, so I tried using the ellie dataset included in your package and I got the same error above. Running rlang::last_error() gives me the following information:

Backtrace:

  1. bsam::fit_ssm(...)
  2. bsam::dat4jags(data, tstep = tstep, tpar = tpar())
  3. dplyr:::left_join.data.frame(d, tpar, by = "lc")
  4. dplyr:::join_mutate(...)
  5. dplyr:::join_rows(x_key, y_key, type = type, na_equal = na_equal)
  6. base::tryCatch(...)
  7. base:::tryCatchList(expr, classes, parentenv, handlers)
  8. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9. value[3L]

It seems there is a problem at some point with joining data. I have not looked into it further, but I thought I should report it.

deprecated functions

Renaming functions is pretty disruptive! You can use "deprecated" to point users to the new way.

Add this in a new file "R/bsam-deprecated.R":

#' Deprecated functions. 
#' 
#' \code{fitSSM} and \code{dplot} and \code{tplot} have been deprecated. Instead use
#' \code{fit_ssm}, \code{diag_ssm} and \code{map_ssm}.
#' @rdname bsam-deprecated
#' @param ... ignored
#' @export
#' @rdname bsam-deprecated 
fitSSM <- function(...) {
  .Deprecated("fit_ssm")
}

#' @export
#' @rdname bsam-deprecated
dplot <- function(...) {
  .Deprecated("diag_ssm")
}

#' @export
#' @rdname bsam-deprecated
tplot <- function(...) {
  .Deprecated("map_ssm")
}

cleanup argument doc

"tod" param was in Rd but not in dat4jags
simTrack has undocumented params, including "T" which maybe should be renamed

Undocumented arguments in documentation object 'ssm' 'adapt' 'samples' 'thin' 'chains' Argument items with no description in Rd object 'diagSSM': 'fit.in' 'save.to.pdf'
Argument items with no description in Rd object 'hssm': 'loc.list' 'model' 'adapt' 'samples' 'thin' 'chains' '...'

Argument items with no description in Rd object 'plotSSM': 'fit.in' 'save.to.pdf'

Argument items with no description in Rd object 'simTrack': 'theta' 'gamma' 'alpha' 'vcov'

add a citation

put this, plus other citEntry, into "inst/CITATION" - then users will get a good citation("bsam")

citHeader("To cite bsam in publications use:")

citEntry(entry = "Article",
  title        = "Robust state-space modeling of animal movement data",
  author       = personList(as.person("Ian D. Jonsen"),
                   as.person("Joanna Mills Flemming"), 
                   as.person("Ransom A. Myers")),
  journal      = "Ecology",
  year         = "2005",
  volume       = "86",
  number       = "11",
  pages        = "2874--2880",
  url          = "http://www.jstatsoft.org/v40/i03/",

  textVersion  =
  paste("Jonsen ID, Mills Flemming J, Myers RA (2005).",
        "Robust state-space modeling of animal movement data.",
        "Ecology 86:2874-2880.")
)

Fixed y limit in plot_fit

Just a recommendation to fix the y axis in the behavior state panel for plot_fit. I find the plot can be mis-leading when it looks like there's good separation among state estimates in the y direction only to see the y axis is c(1, 1.1) rather than the expected ymax = 2.

R-hub for bsam

check the r-hub config for SystemReqs - ensure it supports JAGS

prepare for release

this is a checklist of sorts, of things that R CMD check reports

  • fix version number for release
  • ensure long examples and tests are not run (maybe set up auto-tests, or publish run examples in the README)
  • d and span args need doc in fitSSM
  • not sure if setting NULL value for countriesHigh fixes the issue with hidden global variables (seems to work)

Parallel processing

Hi, I have some acoustic tagging data from a Vemco positioning system that I would like to analyse using your package to estimate behavioural states + account for measurement error in the system. I have been able to get it to run on a very reduced dataset ~150 locations, but my full dataset is ~ 50, 000 from 18 individuals. My concern is the speed of computation. I have access to a high performance cluster and am wondering if the MCMC chains can be run in parallel? Any other tips for speeding up the analysis would be great! Thanks!

Plotting it outputs using the map_ssm with warning sign of deprecated "fortify" function

I just started using the "bsam" package to analyze satellite tag data, and I'm using code examples from a colleague to learn how to use the package. And have received the following warning signs (see below). What are the options for plotting maps of these in the newer ggplot version? Thank you in advance.

Error in x$summary : $ operator is invalid for atomic vectors
In addition: Warning message:
fortify(<SpatialPolygonsDataFrame>) was deprecated in ggplot2 3.4.4.
ℹ Please migrate to sf.
ℹ The deprecated feature was likely used in the bsam package.

fortify(<SpatialPolygonsDataFrame>) was deprecated in ggplot2 3.4.4.
ℹ Please migrate to sf.
ℹ The deprecated feature was likely used in the bsam package.
Please report the issue at https://github.com/ianjonsen/bsam/issues.

Backtrace:

  1. └─bsam::map_ssm(INDIV4)
  2. └─bsam:::map_ssm.d(fit, onemap)
  3. ├─base::suppressMessages(fortify(countriesHigh))
    
  4. │ └─base::withCallingHandlers(...)
    
  5. ├─ggplot2::fortify(countriesHigh)
    
  6. └─ggplot2:::fortify.SpatialPolygonsDataFrame(countriesHigh)
    
  7.   └─ggplot2:::deprecate_warn0(...)
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.