ceff-tech / ffc_api_client

An R client for the online Functional Flows Calculator API
https://ceff-tech.github.io/ffc_api_client
9 stars 3 forks source link

Missing flow_metrics #24

Closed nickrsan closed 4 years ago

nickrsan commented 4 years ago

The flow metrics table is missing unless people use library(ffcAPIClient) beforehand, which makes this code unusable in other packages. Not huge, but we need to:

nickrsan commented 4 years ago

@ryanpeek @alyssaobester FYI, I've resolved this issue - apparently to have the data be available internally and externally, I need to explicitly load the data into an environment within the package if I want to use it. Once I did that, it works in all contexts. No need to call library(ffcAPIClient) before using the code (though I'd be interested in your results!

Resolved in a0da53b421f374a6e16300de0d462cda9f59c81e

This SO page https://stackoverflow.com/questions/53548994/r-package-data-not-available-when-importing-in-another-package made me take a second look at the data docs, and realize I need to use an environment to load my data into within the package.