geomstats / rgeomstats

Geomstats for R
MIT License
2 stars 1 forks source link

warning message when loading the package w/ devtools #26

Open espinielli opened 5 years ago

espinielli commented 5 years ago

When loading the package with devtools I get the following error:

> devtools::load_all(".")
Loading rgeomstats
Warning message:
In .checkFieldsInMethod(def, fieldNames, allMethods) :
  local assignment to field name will not change the field:
    inner.product.mat.at.identity <- diag(1, group$dimension); inner.product.mat.at.identity <- diag(1, .self$group$dimension)
 Did you mean to use "<<-"? ( in method "initialize" for class "InvariantMetric")

Does it mean that at lines 10, 22 and 24 in invariant_metric.R the assignment needs to be changed to use <<-?

espinielli commented 5 years ago

It looks to me that given the code at lines 9-11

      if (is.null(inner.product.mat.at.identity)) {
        inner.product.mat.at.identity <- diag(1, group$dimension)
      }

line 22 (inside the if block 21-23) is never executed (because at line 10 inner.product.mat.at.identity has been made non NULL):

      if (is.null(inner.product.mat.at.identity)) {
        inner.product.mat.at.identity <- diag(1, .self$group$dimension)
      }