Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCG metrics all zero, metric.values() #38

Open
leppott opened this issue Jun 18, 2020 · 2 comments
Open

BCG metrics all zero, metric.values() #38

leppott opened this issue Jun 18, 2020 · 2 comments

Comments

@leppott
Copy link
Owner

leppott commented Jun 18, 2020

Describe the bug
BCG metrics all zero in metric.values().

To Reproduce
Doesn't happen all the time. Does not happen with example dataset.

Expected behavior
Should calculate.

Screenshots
NA

Additional context
Need example data set.

@leppott
Copy link
Owner Author

leppott commented Jun 18, 2020

Received example dataset and confirmed this is an issue.

Determined that BCG attributes with an "i" causes R to interpret them as complex numbers when import the data.

Use this code for importing the file:

df_data <- read.csv("MariNW_AllMetrics_wExclude_20200617.csv"
                    , stringsAsFactors = FALSE
                    , colClasses = c("BCG_Attr" = "character"))

StringsAsFactors isn't a requirement but I typically add it.

The colClasses ensures R brings in the BCG_Attr column as text (character) instead of auto-detecting it.

I checked the output and the BCG metrics now have values.

@leppott
Copy link
Owner Author

leppott commented Jun 18, 2020

Need to add to example code for metric.values() and any other functions with the metric calculations as a step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant