Comments (3)
Thanks for the valuable comments! Most are spot on, and I will correct the problems. I do differ with you on two points. First, AFAIK no one considers an R factor to be an S3 object. Second, regarding the 'mtcars' dataset, the name alludes to the fact that the data comes from Motor Trend, a popular American car magazine in the 1960s/70s; the weights are almost certainly in pounds, just like the gas mileage is in miles/gallon rather than say km/liter.
from faster.
Addressing your points:
- In my experience, people do consider factors to be S3 objects. This is exactly why a lot of R tutorials warn about how they sometimes act like integers and sometimes act like characters. A well-known example is section 8.2. of the R Inferno. The documentation for factors also contains many such warnings. Regardless, whether or not factors are S3 objects is not a matter of opinion. Run
methods(class=factor)
and you will see many generic functions that dispatch to them. - According to
??datasets::mtcars
, thewt
variable is "Weight (1000 lbs)". I think we're both right here. Yes, they're pounds, but the reader ought to be told that adding 100 pounds means adding 0.1.
from faster.
R factors can be both very powerful and highly annoying. In my 'regtools' package (here on GitHub), I actually have 5 or 6 utilities to deal with problems arising with factors. But I've never heard anyone consider factors to be S3. I've been active in R since almost the beginning (and was an S user before R), have served in editorial capacity with 2 R-related journals etc.
from faster.
Related Issues (16)
- Minor typo HOT 1
- Lesson 4 typo HOT 1
- Minor typos in Lesson 4 HOT 1
- Minor typos and other in Lesson 5 HOT 1
- Wrong example in Lesson 18.
- Minor typo in Lesson 20 HOT 1
- Minor typo in Lesson 22 HOT 2
- (Possibly) Incompatible code in Lesson 27 HOT 1
- Unclear code and Your Turn in Lesson 29
- Lesson 8 Nile Values typos HOT 1
- Lessons 2 - 13 are repeated two extra times HOT 1
- Typos in lessons 29, 35, and 36 HOT 1
- minor typo HOT 1
- Some minor typos HOT 1
- minor typo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faster.