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

Handle new default stringsAsFactors setting in R v4.0.0 #74

Merged
merged 1 commit into from
May 4, 2023

Conversation

ichthya
Copy link

@ichthya ichthya commented Jun 25, 2020

Line 67: when reading the data frame we need to add the stringAsFactors = TRUE because of the recent change from the default option TRUE to FALSE in R version 4.0.0. If we do not do that, all the examples in the lesson regarding factors would not be able to be used.

Line 67: when reading the data frame we need to add the stringAsFactors = TRUE because of the recent change from the default option TRUE to FALSE in R version 4.0.0. If we do not do that, all the examples in the lesson regarding factors would not be able to be used.
@jsta
Copy link
Member

jsta commented Jun 27, 2020

Thanks for catching this! Definitely needs a fix. I wonder if this is a big enough gotcha that we should give it a special "warning" call-out box instead of an inline code comment carpentries/styles#49

@ichthya
Copy link
Author

ichthya commented Jun 29, 2020

Thanks for catching this! Definitely needs a fix. I wonder if this is a big enough gotcha that we should give it a special "warning" call-out box instead of an inline code comment carpentries/styles#49
I think just adding the stringAsFactor = TRUE might add some confusion to students, especially might give the wrong idea of this being a common practice. But not reading as factors would require some revision in several portions of the lesson. Because this was my first contribution, I suggested the simpler solution, but Im happy to help to modify the lesson in a way that factors come as a secondary point.

@jsta jsta added the high priority Need to be addressed ASAP label Jul 18, 2020
@jsta
Copy link
Member

jsta commented Jul 18, 2020

See also, datacarpentry/R-ecology-lesson#608

@jsta jsta changed the title Update 04-data-structures-part2.Rmd Handle new default stringsAsFactors setting in R v4.0.0 Jul 18, 2020
@lachlandeer
Copy link
Contributor

Hi @jsta ,

What's the status with this PR? Can it be integrated, closed or is it part of a bigger project around R 4.0?

@jsta
Copy link
Member

jsta commented Sep 23, 2020

I think it can be merged for now. My suggestion is that a future PR be opened more strongly warning about the change to stringsAsFactors. Possibly using the new .caution box style (https://github.com/carpentries/styles/pull/475/files).

Base automatically changed from master to main March 22, 2021 15:36
@tobyhodges
Copy link
Member

Merging this in advance of the lesson infrastructure transition.

@tobyhodges tobyhodges merged commit cb847c1 into datacarpentry:main May 4, 2023
tobyhodges added a commit that referenced this pull request May 4, 2023
tobyhodges added a commit that referenced this pull request May 4, 2023
zkamvar pushed a commit that referenced this pull request May 4, 2023
Handle new default stringsAsFactors setting in R v4.0.0
zkamvar pushed a commit that referenced this pull request May 4, 2023
zkamvar pushed a commit that referenced this pull request May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Need to be addressed ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants