Package: memisc 0.99.31.8.1

Martin Elff

memisc: Management of Survey Data and Presentation of Analysis Results

An infrastructure for the management of survey data including value labels, definable missing values, recoding of variables, production of code books, and import of (subsets of) 'SPSS' and 'Stata' files is provided. Further, the package allows to produce tables and data frames of arbitrary descriptive statistics and (almost) publication-ready tables of regression model estimates, which can be exported to 'LaTeX' and HTML.

Authors:Martin Elff [aut, cre], Christopher N. Lawrence [ctb], Dave Atkins [ctb], Jason W. Morgan [ctb], Achim Zeileis [ctb], Mael Astruc-Le Souder [ctb], Kiril Mueller [ctb], Pieter Schoonees [ctb]

memisc_0.99.31.8.1.tar.gz
memisc_0.99.31.8.1.tar.gz(r-4.5-noble)memisc_0.99.31.8.1.tar.gz(r-4.4-noble)
memisc_0.99.31.8.1.tgz(r-4.4-emscripten)memisc_0.99.31.8.1.tgz(r-4.3-emscripten)
memisc.pdf |memisc.html
memisc/json (API)
NEWS

# Install 'memisc' in R:
install.packages('memisc', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/melff/memisc/issues

8.22 score 13 packages 1.1k scripts 11k downloads 2 mentions 203 exports 5 dependencies

Last updated 5 days agofrom:e52b8e93ab. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 25 2024
R-4.5-linux-x86_64OKOct 25 2024

Exports:%@%%@%<-%##%%#%%$%%$$%%if%%in%%nin%Aggregateannotationannotation<-applyTemplateArithas_havenas_tibble.data.setas.arrayas.cssas.data.setas.factoras.html_groupas.intervalas.itemas.nominalas.orderedas.ordinalas.ratioas.symbolsattribsattribs<-BycasescharTranscoarsencodebookcodebook_format_stdstylecodeplancodeplan<-coercecollectcolrenameComparecontentcontent<-contrcontr.sumcontr.treatmentcontractcontrastscontrasts<-CorCovcssdata.setdeduplicate_labelsdescriptiondescription<-Descriptivesdf_format_stdstyledimrenamedsViewduplicated_labelsfapplyforeachformat_htmlformat_mdftable_format_stdstylegenTablegetCoefTemplategetSummarygetSummary_expcoefgetSummary_expcoef.defaultgetSummary.aftreggetSummary.betareggetSummary.clmgetSummary.coxphgetSummary.glmgetSummary.hurdlegetSummary.ivreggetSummary.lmgetSummary.merModgetSummary.multinomgetSummary.phreggetSummary.polrgetSummary.simexgetSummary.survreggetSummary.tobitgetSummary.weibreggetSummary.zeroinflgetSummaryTemplateGroupsheadhtmlhtml_groupIconvinclude.missingsinitializeis.data.setis.intervalis.missingis.nominalis.ordinalis.ratiois.validlabelslabels<-LapplyListmat_format_stdstyleMathMath2MaxMeanMeansmeasurementmeasurement_autolevelmeasurement<-MedianmergeMinmissing.valuesmissing.values<-mtablemtable_format_delimmtable_format_htmlmtable_format_latexmtable_format_printmtable_format_stdstyleneg2misnvalidpercentpercent.defaultpercent.logicalpercentagesprintqueryRangeread_codeplanrecoderecombinerelabelrelabel4renameReshaperetainreversedrow.namesrowrenamesampleSapplyset_measurementsetAttribssetCodeplansetCoefTemplatesetContentsetStylesetSummaryTemplateshowshow_htmlsort.data.framesort.data.setspss.filespss.fixed.filespss.portable.filespss.system.fileStata.fileStdDevstylestyle<-SubstitutesummarySummarysummaryTemplatesymsTabletailto.data.frametrim_labelsuniquevalid.rangevalid.range<-valid.valuesvalid.values<-value.filterVarviewview_htmlviewPrepWeighted.Meanwild.codeswithGroupswithinWithinwithinGroupswithSEwithVCovwordingwording<-Writewrite_codeplanwrite_htmlwrite.mtablexapply

Dependencies:data.tablejsonlitelatticeMASSyaml

Analysing the American National Election Study of 1948

Rendered fromanes48.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2016-01-18

Combining flattened contingency tables (and other tables)

Rendered fromftable-matrix.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2016-01-18

Generating Tables of Descriptive Statistics

Rendered fromgentab.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2024-09-29

Handling questionnaire items

Rendered fromitems.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2016-01-18

Importing data from SPSS and Stata

Rendered fromimport.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2024-09-29

Tables of model estimates

Rendered frommtable-html.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-09-29
Started: 2016-01-18

Readme and manuals

Help Manual

Help pageTopics
Adding Annotations to Objectsannotation annotation,ANY-method annotation,data.set-method annotation,item-method annotation-class annotation<- annotation<-,ANY,annotation-method annotation<-,ANY,character-method annotation<-,ANY,NULL-method annotation<-,item,annotation-method annotation<-,vector,annotation-method description description,data.frame-method description,data.set-method description,importer-method description,tbl_df-method description<- show,annotation-method wording wording<-
Apply a Formatting Template to a Numeric or Character VectorapplyTemplate template
Converting Data Frames into Arraysas.array as.array,data.frame-method
Construction of Lists of Symbolsas.symbols syms
Assign a values to a variable for instances where a condition is met%if% assign_if
Operators for Setting Annotations and Attributes%##% %#% %@% %@%<-
Conditional Evaluation of an ExpressionBy
Distinguish between Cases Specified by Logical Conditionscases
Character Translation of Aspects of ObjectscharTrans charTrans.annotation charTrans.character charTrans.data.set charTrans.importer charTrans.item charTrans.value.labels
Coarsen a vector into a factor with a lower number of levelscoarsen coarsen.numeric
Generate a Codebook of a Data Set$,codebook-method as.character,codebook-method codebook codebook,ANY-method codebook,atomic-method codebook,data.frame-method codebook,data.set-method codebook,factor-method codebook,importer-method codebook,item-method codebook,NULL-method codebook,tbl_df-method codebook-class format,codebookEntry-method show,codebook-method [,codebook,atomic,missing,ANY-method [[,codebook-method
Describe structure of Data Sets and Importerscodeplan codeplan,ANY-method codeplan,item-method codeplan,item.list-method codeplan<- read_codeplan setCodeplan setCodeplan,atomic,codeplan-method setCodeplan,atomic,NULL-method setCodeplan,data.frame,codeplan-method setCodeplan,data.frame,NULL-method setCodeplan,data.set,codeplan-method setCodeplan,data.set,NULL-method setCodeplan,item,codeplan-method setCodeplan,item,NULL-method write_codeplan
Collect Objectscollect collect.array collect.data.frame collect.data.set collect.default collect.matrix collect.table
Convenience Methods for Setting Contrastscontr contr.sum contr.treatment contrasts contrasts,ANY-method contrasts,item-method contrasts<- contrasts<-,ANY-method contrasts<-,item-method
Contract data into pattern-frequency formatcontract contract.data.frame contract.data.set
Data Set Objectsas.data.frame.data.set as.data.set as.data.set,list-method as.data.table.data.set data.set data.set-class dim,data.set-method dimnames,data.set-method dimnames<-,data.set-method dsView format,data.set-method head,data.set-method initialize,data.set-method is.data.set print,data.set-method row.names,data.set-method show,data.set-method str.data.set summary,data.set-method tail,data.set-method within,data.set-method [,data.set,atomic,atomic,ANY-method [,data.set,atomic,missing,ANY-method [,data.set,missing,atomic,ANY-method [,data.set,missing,missing,ANY-method [<-,data.set-method
Manipulation of Data Setscbind.data.set merge,data.frame,data.set-method merge,data.set,data.frame-method merge,data.set,data.set-method rbind.data.set subset.data.set unique,data.set-method
Handle duplicated labelsdeduplicate_labels deduplicate_labels.item deduplicate_labels.item.list
Vectors of Univariate Sample StatisticsDescriptives Descriptives,ANY-method Descriptives,atomic-method Descriptives,item.vector-method
Change dimnames, rownames, or colnamescolrename dimrename rowrename
Check for and report duplicated labelsduplicated_labels duplicated_labels.item duplicated_labels.item.list
Loop over Variables in a Data Frame or Environmentforeach
Format Objects in HTML, show the HTML Format or Write it to a Filedf_format_stdstyle format_html format_html.data.frame format_html.matrix mat_format_stdstyle show_html write_html
Format Codebooks as HTMLcodebook_format_stdstyle format_html.codebook
Format "Flattened Tables" as HTMLformat_html.ftable format_html.ftable_matrix ftable_format_stdstyle
Format Codebooks as Markdownformat_md format_md.codebook format_md.codebookEntry
Combining flattened tables.cbind.ftable cbind.ftable_matrix format.ftable_matrix ftable_matrix print.ftable_matrix rbind.ftable rbind.ftable_matrix Write.ftable_matrix
Generic Tables and Data Frames of Descriptive StatisticsAggregate genTable
Get Model Summaries for Use with "mtable"getSummary getSummary.aftreg getSummary.betareg getSummary.clm getSummary.coxph getSummary.glm getSummary.hurdle getSummary.ivreg getSummary.lm getSummary.merMod getSummary.multinom getSummary.phreg getSummary.polr getSummary.simex getSummary.survreg getSummary.tobit getSummary.weibreg getSummary.zeroinfl getSummary_expcoef getSummary_expcoef.default
Operate on grouped data in data frames and data setsas.data.frame.grouped.data as.data.set,grouped.data.frame-method as.data.set,grouped.data.set-method grouped.data Groups Groups.data.frame Groups.data.set Groups.grouped.data recombine recombine.grouped.data.frame recombine.grouped.data.set with.grouped.data withGroups within.grouped.data withinGroups
Building Blocks for HTML Codeas.character.css as.character.html_elem as.character.html_group as.css as.html_group attribs attribs<- c.html_elem c.html_group content content<- css html html_group print.css print.html_elem print.html_group setAttribs setAttribs.character setAttribs.html_elem setAttribs.html_group setContent setStyle setStyle.character setStyle.html_elem setStyle.html_group style style<- [.html_group [<-.css [<-.html_attributes [<-.html_group
Convert Annotations, and Value Labels between EncodingsIconv Iconv.annotation Iconv.character Iconv.data.set Iconv.importer Iconv.item Iconv.value.labels
Object Oriented Interface to Foreign Files$,importer-method as.data.set,importer-method dim,importer-method head,importer-method importer importer-class initialize,spss.fixed.importer-method initialize,spss.portable.importer-method initialize,spss.system.importer-method initialize,Stata.importer-method initialize,Stata_new.importer-method names,importer-method show,spss.fixed.importer-method show,spss.portable.importer-method show,spss.system.importer-method show,Stata.importer-method show,Stata_new.importer-method spss.file spss.fixed.file spss.fixed.importer-class spss.portable.file spss.portable.importer-class spss.system.file spss.system.importer-class Stata.file Stata.importer-class Stata_new.importer-class subset.spss.fixed.importer subset.spss.portable.importer subset.spss.system.importer subset.Stata.importer subset.Stata_new.importer tail,importer-method [,importer,atomic,atomic,ANY-method [,importer,atomic,missing,ANY-method [,importer,missing,atomic,ANY-method [,importer,missing,missing,ANY-method [[,importer-method
Survey Items%in%,numeric.item,character-method Arith,numeric,numeric.item-method Arith,numeric.item,numeric-method Arith,numeric.item,numeric.item-method as.item as.item,character-method as.item,character.item-method as.item,Date-method as.item,Date.item-method as.item,datetime.item-method as.item,double.item-method as.item,factor-method as.item,integer.item-method as.item,logical-method as.item,numeric-method as.item,ordered-method as.item,POSIXct-method character.item-class Compare,character,numeric.item-method Compare,numeric.item,character-method Date.item-class datetime.item-class double.item-class format,Date.item-method format,datetime.item-method format,item.vector-method integer.item-class item item-class item.vector-class items Math,numeric.item-method Math2,numeric.item-method numeric.item-class print,Date.item-method print,datetime.item-method print,item.vector-method rep,item.vector-method show,Date.item-method show,datetime.item-method show,item.vector-method str.character.item str.datetime.item str.double.item str.integer.item summary,Date.item-method summary,datetime.item-method summary,item.vector-method Summary,numeric.item-method unique,item.vector-method weighted.mean,item.vector-method [,datetime.item,logical,missing,missing-method [,datetime.item,numeric,missing,missing-method [,item.vector,logical,missing,missing-method [,item.vector,numeric,missing,missing-method
How Survey Items Are Converted into "Ordinary" Data Vectorsas.character,Date.item-method as.character,Date.item.vector-method as.character,datetime.item-method as.character,datetime.item.vector-method as.character,item.vector-method as.data.frame.character.item as.data.frame.Date.item as.data.frame.datetime.item as.data.frame.double.item as.data.frame.integer.item as.factor,item.vector-method as.integer,item-method as.numeric,item-method as.ordered,item.vector-method as.vector,item-method
Value LabelsArith,value.labels,ANY-method as.vector,value.labels-method coerce,character,value.labels-method coerce,numeric,value.labels-method coerce,value.labels,character-method coerce,value.labels,numeric-method initialize,value.labels-method labels labels,item-method labels,NULL-method labels<- labels<-,ANY,NULL-method labels<-,item,ANY-method labels<-,item,NULL-method labels<-,vector,ANY-method labels<-,vector,NULL-method show,value.labels-method value.labels-class [,value.labels,logical,missing,missing-method [,value.labels,numeric,missing,missing-method
Create a list and conveniently supply names to its elementsList
Convenience wrappers for common statistical functionsCor Cov Max Mean Median Min Range StdDev Var Weighted.Mean
Means for groups of observationsas.data.frame.means.table as.data.frame.xmeans.table Means Means.data.frame Means.formula Means.numeric
Levels of Measurement of Survey Itemsas.interval as.nominal as.ordinal as.ratio is.interval is.nominal is.ordinal is.ratio measurement measurement,ANY-method measurement,data.set-method measurement,item-method measurement<- measurement<-,data.set-method measurement<-,item-method set_measurement
Automatically Adapt Measurement Levelsmeasurement_autolevel measurement_autolevel,ANY-method measurement_autolevel,data.set-method measurement_autolevel,item.vector-method
Introduction to the 'memisc' Packagememisc-package memisc
Deprecated Functions in Package 'memisc'fapply fapply.default memisc-deprecated
Comparative Table of Model Estimatesc.memisc_mtable dim.memisc_mtable dimnames.memisc_mtable format.memisc_mtable mtable print.memisc_mtable relabel.memisc_mtable toLatex.memisc_mtable write.mtable [.memisc_mtable
Format for 'mtable' Objects for Writing into Filemtable_format_delim
HTML Formatting for 'mtable' Resultsformat_html.memisc_mtable mtable_format_html mtable_format_stdstyle
Format 'mtable' Results for LaTeXmtable_format_latex
Print Format for 'mtable' Objectsmtable_format_print
Mark Negative Values as Missingneg2mis
Negative Match%nin%
Table of Percentages with Percentage Basepercent percent.default percent.logical
Easy Creation of Tables of Percentagesas.data.frame.percentage.table as.data.frame.xpercentage.table percentages percentages.data.frame percentages.default percentages.formula percentages.list percentages.table
Query an Object for Informationquery query,data.set-method query,importer-method query,item-method
Recode Items, Factors and Numeric Vectorsrecode recode,factor-method recode,item-method recode,vector-method
Change labels of factors or labelled objectsrelabel relabel.default relabel.factor relabel4 relabel4,item-method
Change Names of a Named Objectrename
Reorder an Array or Matrixreorder reorder.array reorder.matrix
Reshape data frames or data setsReshape
Retain Objects in an Environmentretain
Reverse the codes of a survey item or the levels of a factorreversed reversed,factor-method reversed,item.vector-method
Take a Sample from a Data Frame-like Objectsample,data.frame-method sample,data.set-method sample,importer-method
A Dimension Preserving Variant of "sapply" and "lapply"Lapply Sapply
Convenience Methods to Sort Data Frames and Data Setssort.data.frame sort.data.set
Formatting Styles for Coefficients, Factor Contrasts, and Summary Statisticscoef.style factor.style getCoefTemplate getSummaryTemplate setCoefTemplate setSummaryTemplate summaryTemplate
Substitutions in Language ObjectsSubstitute
One-Dimensional Table of Frequences and/or PercentagesTable Table,atomic-method Table,factor-method Table,item.vector-method
Interface to Packages 'tibble' and 'haven'as.data.set,tbl_df-method as.item,haven_labelled-method as.item,haven_labelled_spss-method as.item,labelled-method as_haven as_haven,data.set-method as_haven,item.vector-method as_tibble.data.set
Convert an Array into a Data Frameto.data.frame
Additional Methods for LaTeX Representations for R objectstoLatex.data.frame toLatex.default toLatex.ftable toLatex.ftable_matrix toLatex.matrix
Trim Codes from the Labels of an Itemtrim_labels trim_labels,data.set-method trim_labels,item.vector-method
Named Lists, Lists of Items, and Atomic Vectorsatomic-class coerce,data.set,named.list-method double-class initialize,item.list-method initialize,named.list-method item.list item.list-class named.list named.list-class show,named.list-method
Value FiltersArith,missing.values,missing.values-method Arith,valid.range,valid.range-method Arith,valid.values,valid.values-method Arith,value.filter,vector-method coerce,atomic,missing.values-method coerce,atomic,valid.range-method coerce,atomic,valid.values-method coerce,list,missing.values-method format,missing.values-method format,valid.range-method format,valid.values-method include.missings include.missings,item-method is.missing is.missing,atomic-method is.missing,factor-method is.missing,item.vector-method is.missing,NULL-method is.valid missing.values missing.values,item.vector-method missing.values,NULL-method missing.values-class missing.values<- missing.values<-,ANY,atomic-method missing.values<-,ANY,list-method missing.values<-,ANY,NULL-method missing.values<-,atomic,missing.values-method missing.values<-,item,ANY-method missing.values<-,item,missing.values-method missing.values<-,item,NULL-method nvalid show,value.filter-method valid.range valid.range,item.vector-method valid.range,NULL-method valid.range-class valid.range<- valid.range<-,ANY,atomic-method valid.range<-,ANY,NULL-method valid.range<-,atomic,valid.range-method valid.range<-,item,valid.range-method valid.values valid.values,item.vector-method valid.values,NULL-method valid.values-class valid.values<- valid.values<-,ANY,atomic-method valid.values<-,ANY,NULL-method valid.values<-,atomic,valid.values-method valid.values<-,item,valid.values-method value.filter value.filter,item-method value.filter,NULL-method value.filter-class
A Generic Viewing Functionview viewPrep viewPrep.codeplan viewPrep.data.frame viewPrep.data.set viewPrep.default viewPrep.descriptions viewPrep.importer
HTML Output for 'view.view_html
Table of frequencies for unlabelled codeswild.codes wild.codes,item-method
Operators to abbreviate use of "with" and "within"%$$% %$% Within Within.data.frame
Add Alternative Variance Estimates to Models Estimatessummary.withVCov summary.withVCov.lm vcov.withVCov withSE withVCov withVCov.lm
Write Codebooks and Variable Descriptions into a Text FileWrite Write.codebook Write.descriptions
Apply a function to ranges of variablesxapply