[R] foreign package read.spss() and NA levels
Ju@t|n@A||en @end|ng |rom bregroup@com
Thu May 27 12:27:31 CEST 2021
Wanted to report what may be a bug or possibly an oversight, but I am unsure, in the "foreign" packages in the read.spss() command, https://cran.r-project.org/web/packages/foreign/index.html. When running the following code,
input <- read.spss("[.sav file location]", to.data.frame = TRUE)
The read.spss() seems to be applying addNA() to factors so NA is being set as a level, and there seems to be no way to get read.spss() to bring factors in without doing this. This seems to be a recent change as read.spss() was not doing this as of a few months ago. None of the arguments in read.spss() seem to also stop this behaviour. I am currently on the most recent version of both R and the package, as of 27/05/21, and am using RStudio Version 1.4.1106.
p.s. your continued maintenance and additions to R and its packages have been infinitely useful in my work and life and thank for that.
Housing Consultant, BRE<https://bregroup.com/>
Follow BRE on Twitter: @BRE_Group<http://twitter.com/BRE_Group>
Privileged and confidential information and/or copyright material may be contained in this e-mail. If you are not the intended addressee you may not copy or deliver it to anyone else or use it in any unauthorised manner. To do so is prohibited and may be unlawful. If you have received this e-mail by mistake, please advise the sender immediately by return e-mail and destroy all copies. Thank you.
Building Research Establishment Ltd, Registered under number 3319324 in England and Wales. VAT Registration No GB 689 9499 27 www.bregroup.com<http://www.bregroup.com>
BRE Global Limited, Registered under number 8961297 in England and Wales. www.breglobal.com<http://www.breglobal.com>
Building Research Establishment and BRE Global are subsidiaries of the BRE Trust.
BRE Trust is a company limited by guarantee, Registered under number 3282856 in England and Wales, and registered as a charity in England (no. 1092193) and in Scotland (no. SC039320). www.bretrust.org.uk<http://www.bretrust.org.uk>
Registered Offices: Bucknalls Lane, Garston, Watford, Hertfordshire WD25 9XX - Travelling to BRE: see www.bregroup.com/contact/directions/<http://www.bregroup.com/contact/directions/>
[[alternative HTML version deleted]]
More information about the R-help