mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Fix warning about stringsAsFactors
In R 4.0.0, stringsAsFactors default value changed from TRUE to FALSE. This commit fixes the warning message in the current file to make this clear for readers. This commit also updates the list of contributors for this file.
This commit is contained in:
parent
fbdc0115e9
commit
c4c53cc95e
@ -4,6 +4,7 @@ contributors:
|
|||||||
- ["e99n09", "http://github.com/e99n09"]
|
- ["e99n09", "http://github.com/e99n09"]
|
||||||
- ["isomorphismes", "http://twitter.com/isomorphisms"]
|
- ["isomorphismes", "http://twitter.com/isomorphisms"]
|
||||||
- ["kalinn", "http://github.com/kalinn"]
|
- ["kalinn", "http://github.com/kalinn"]
|
||||||
|
- ["mribeirodantas", "http://github.com/mribeirodantas"]
|
||||||
filename: learnr.r
|
filename: learnr.r
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -478,9 +479,10 @@ class(students[,3]) # "factor"
|
|||||||
nrow(students) # 6
|
nrow(students) # 6
|
||||||
ncol(students) # 3
|
ncol(students) # 3
|
||||||
dim(students) # 6 3
|
dim(students) # 6 3
|
||||||
# The data.frame() function converts character vectors to factor vectors
|
# The data.frame() function used to convert character vectors to factor
|
||||||
# by default; turn this off by setting stringsAsFactors = FALSE when
|
# vectors by default; This has changed in R 4.0.0. If your R version is
|
||||||
# you create the data.frame
|
# older, turn this off by setting stringsAsFactors = FALSE when you
|
||||||
|
# create the data.frame
|
||||||
?data.frame
|
?data.frame
|
||||||
|
|
||||||
# There are many twisty ways to subset data frames, all subtly unalike
|
# There are many twisty ways to subset data frames, all subtly unalike
|
||||||
|
Loading…
Reference in New Issue
Block a user