Skip to content

Some warning message / check suggestions for add_FA #23

Description

@fredtal

I got the fatty acid data loaded again today, but I had some trouble and it took me a while to figure out what was up. I eventually tracked it down to these places and thought some warning messages / checks might help.

  1. DataIO: line 294: "stopifnot(dim(mean_c)[1]==n.preys & dim(mean_c)[2]==n.fats)": add something like, "number of fatty acids in Conv.Coeff.mean does not match number of fatty acids in the predators file" and/or "number of prey in Conv.Coeff.mean does not match number of preys in preys file".
  2. DataIO: line 294: "stopifnot(dim(var_c)[1]==n.preys & dim(var_c)[2]==n.fats)": "number of fatty acids in Conv.Coeff.var does not match number of fatty acids in the predators file" and/or "number of prey in Conv.Coeff.var does not match number of preys in preys file".
  3. DataIO: line 371: " R[,,i]=cov(alr(preys[preys.ix==unique(preys.ix)[i],]))*ni[i]". I got an error here, I think because there was one prey category for which there was only one prey item, so it couldn't do a covariance matrix? I removed that prey item and it went okay. If that is indeed the problem, maybe check to make sure there is more than one prey item in each category and throwing an error before doing the cov(alr(...)) call?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions