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

Output incorrect to description #478

Closed
EPLeyne opened this issue Jun 3, 2020 · 3 comments
Closed

Output incorrect to description #478

EPLeyne opened this issue Jun 3, 2020 · 3 comments

Comments

@EPLeyne
Copy link

EPLeyne commented Jun 3, 2020

http://swcarpentry.github.io/r-novice-inflammation/11-supp-read-write-csv/index.html

The 'stringsAsFactors' (from line 75) section of this episode does not appear as described. The first assignment runs and returns a list of all the car colours. However the descriptions says that it is "Blue", "Green" and '1','2'....
Untitled (2)

Looking at the str(carSpeeds) the description doesn't match the output in the screen (description: "We can see that the $Color and $State columns are factors and $Speed is a numeric column.." output: $Color and $State are character strings, and $Speed is an int column.
Untitled2 (2)

I also ran the script in my RStudio and it did output as the description except for the str(carSpeeds) (line 89), $Color is a character string.

@strajanoski
Copy link

Dear EPleyne,

thanks for reporting this discrepancy. Can you please check issue #472 as it reports the same problem.

Regards,
Slave

@EPLeyne
Copy link
Author

EPLeyne commented Jun 3, 2020

Thanks for identifying the link Slave.

I note that the initial comment in that issue was made a month ago, and that neither the reporter nor the first replyer noted the problem with the colours not being listed as factors. So I wonder if they didn't notice it or this is a new issue.

As per your reply in that issue, if you think it is a HTML issue then it is way above my head, but I'll keep looking at the script and see if I can spot anything.

@Bisaloo
Copy link
Member

Bisaloo commented Dec 16, 2023

Thanks for the report! It is the same issue as #493.

Briefly, the version 4.0 of R changed the default value of stringAsFactors in read.csv(). This was not properly documented in the lesson for a brief period of time and lead to confusion with results for learners possibly differing from what we were showing in the lesson.

As mentioned in #493, this is hopefully now clearer since 3922356 and subsequent lesson updates. Please reach out if you still encounter issues with this.

@Bisaloo Bisaloo closed this as completed Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants