================================================================================== New memisc release 0.99.20.1 improves compatibility with RStudio and "tidyverse" ================================================================================== .. post:: 22 Nov 2019 :category: software, memisc :excerpt: 3 .. previewimage:: view-importer-screenshot-small.png Release 0.99.20.1. has been published on `CRAN`_. It improves the way the package interoperates with `RStudio`_ and "tidyverse". In particular: - A function :rdoc:`memisc::view()` provides a generic interface to the GUI function ``View()`` in base *R* and *RStudio*. It makes it possible to extend it to data objects of the classes ":rdoc:`memisc::data.set`", ":rdoc:`memisc::codeplan`", ":rdoc:`memisc::description descriptions`", and ":rdoc:`memisc::importer`". .. figure:: view-importer-screenshot.png :figwidth: 100% :align: center The result of ``view(ZA5702)``, where ``ZA5702`` is an "importer" object created by ``spss.file("ZA5702_v2-0-0.sav")``. - A :rdoc:`memisc::as_tibble()` method for ":rdoc:`memisc::data.set`" objects allows to transfer these objects more easiliy into the "tidyverse", i.e. facilitates the use of functions from these package ecosystem on data sets imported or created with *memisc*. An :rdoc:`memisc::as_haven()` function translates ":rdoc:`memisc::data.set`" objects into "tibbles" with that extra information that the "haven" package adds to "tibbles" imported with the help of that package. This should allow to view and post-process data imported with *memisc* more or less the same way as if the data were imported with "haven". - When a ":rdoc:`memisc::data.set`" object is translated into a data frame using :rdoc:`memisc::as.data.frame.data.set as.data.frame()`, :rdoc:`memisc::as_tibble.data.set as_tibble()`, :rdoc:`memisc::as_haven()`, or :rdoc:`memisc::viewPrep()` (the internal function used by :rdoc:`memisc::view()` to prepare data for being viewed) the "description" :rdoc:`memisc::annotation` of the variables (or ":rdoc:`memisc::item`" objects) are retained as "label" attributes, so that labels are visible when viewed in *RStudio*. .. figure:: view-dataset-screenshot.png :figwidth: 100% :align: center The result of ``view(gles2013work)``, where ``gles2013work`` is a "data.set" object created by ``subset(ZA5702,...)``. - A :rdoc:`memisc::List()` function adds names to its elements by deparsing arguments in the same way as ``data.frame()`` does. - A new function :rdoc:`memisc::Groups()` allows to split a data frame or a ":rdoc:`memisc::data.set`" into group based on factors in a more convenient way. There are methods of :rdoc:`memisc::with.grouped.data with()` and :rdoc:`memisc::within.grouped.data within()` to deal with resulting objects of class "grouped.data". For example, the :rdoc:`memisc::within.grouped.data within()` method allows to substract group means from the observations within groups. :rdoc:`memisc::withinGroups()` allows to split a data frame or "data.set" objects into groups, make within-group computations and recombine the groups into the order of the original data frame or ":rdoc:`memisc::data.set`" object. - :rdoc:`memisc::Stata.file()` now handles files in format rev. 117 and later as they are created by Stata version later than 13. - User definded missing values are now reported in separate tables in entries created by :rdoc:`memisc::codebook()` even if these entries refer to :rdocc:`memisc::item items` with :rdocc:`memisc::measurement measurement level` "interval" or "ratio". - If the annotation or the labels of a non-item is set to ``NULL`` this no longer causes an error. - Changing varible names to lowercase while importing data sets with :rdoc:`memisc::Stata.file()`, :rdoc:`memisc::spss.portable.file()`, and :rdoc:`memisc::spss.system.file()` is now optional. - Importer methods :rdoc:`memisc::Stata.file()`, :rdoc:`memisc::spss.portable.file()`, and :rdoc:`memisc::spss.system.file()` now have optional arguments that allow to deal with variable labels or value labels in non-native encoding (e.g. ``CP1252`` on a ``utf-8`` platform). - A function :rdoc:`memisc::spss.file()` acts as a common interface to :rdoc:`memisc::spss.portable.file()` and :rdoc:`memisc::spss.system.file()`. - The function :rdoc:`memisc::head()` and :rdoc:`memisc::tail()` now work with ":rdoc:`memisc::data.set`" and ":rdoc:`memisc::importer`" objects in the same sensible way as they do with data frames. - The function :rdoc:`memisc::recode()` behaves more coherently: If a labelled vector is the result of :rdoc:`memisc::recode()` it gets the :rdocc:`memisc::measurement measurement level` "nominal". Factor levels explictly created first come first in the order of factor levels. .. _CRAN: http://cran.r-project.org/package=memisc .. _RStudio: http://rstudio.org