Closed katiewebster closed 3 years ago
When going through all of the calculations (especially with exponentiating, square rooting, squaring) there might be some estimation/additional digits being brought along. For example, suppose that you have a data set like the following where the values represent percent:
Fresh | Soph | Jun | Sen | Total |
---|---|---|---|---|
37 | 25 | 20 | 18 | 100 |
You want to verify that columns Fresh through Sen actually add up to the total so you might do something like Total - sum(Fresh, Soph, Jun, Sen)
(note that this won't work in R). However, you might get a result of 0.00000001. Rounding after the calculations helps to verify values that we expect to get.
I'm having somewhat of a problem with problem 12 of the .rmd file. I'm wondering why we need to round to the nearest whole number when it seems the numbers are already like that?
And also, I can set all instances of 39 to 20 but then I can't figure out how to assign that to top_secret without running the part of the code twice. It seems you can't do two <- in one line.(This has been moved to its own issue: #17)