microsoft / vivainsights

R library to analyze and visualize data from Viva Insights Analyst Experience
https://microsoft.github.io/vivainsights/
Other
10 stars 2 forks source link

`export()` prints row numbers when printing csv #35

Open martinctc opened 1 month ago

martinctc commented 1 month ago

The current default behaviour for export(..., method = 'csv') is to print out a csv file that contains row numbers.

This behaviour is inconsistent with tidy data principles.

Row numbers can introduce redundancy, as they can imply an additional, unnecessary variable that doesn't contain any meaningful information. They can also lead to confusion if the row numbers are mistaken for data or if they are inconsistent due to sorting or filtering the data. Tidy data focuses on the relationships between variables and observations, not the row numbers, which is why including them can be contrary to tidy principles.

This can be corrected by setting the offending code to:

write.csv(..., row.names = FALSE)