Tazinho / Advanced-R-Solutions

Set of solutions for the Advanced R programming book
https://advanced-r-solutions.rbind.io/
290 stars 118 forks source link

Answer updates needed for sec 2.4 Q2: is.vector(as.vector(mtcars)) #289

Open kaz462 opened 1 year ago

kaz462 commented 1 year ago

Sec 2.4 Lists Q2 answer:

Note that as.vector() and is.vector() use different definitions of “vector!”

> is.vector(as.vector(mtcars))
> #> [1] FALSE

The above output is correct for R version before 4.2.2, but the output is changed to TRUE by using R version 4.2.2

> is.vector(as.vector(mtcars))
> #> [1] TRUE
Tazinho commented 1 year ago

Thank you for posting this finding. Will incorporate this with the next round of updates.