51 search results for "contingency table data frame"

How to convert contingency tables to data frames with R

March 14, 2012
By

I wanted to write contingency tables in HTML with hwrite(). I realized that the method hwrite() does not exist for the table objects. I could use as.data.frame(), but the table produced is non-intuitive. I did a search on R-bloggers and I quickly found the solution to my problem: the as.data.frame.matrix() function. The contingency table A

Read more »

Converting R contingency tables to data frames

August 11, 2010
By

A contingency table presents the joint density of one or more categorical variables. Each entry in a contingency table is a count of the number of times a particular set of factors levels occurs in the dataset. For example, consider a list of plant ...

Read more »

Direct integration of sjPlot-tables in knitr-rmarkdown-documents #rstats

March 5, 2017
By
Direct integration of sjPlot-tables in knitr-rmarkdown-documents #rstats

A new update of my sjPlot-package was just released on CRAN. Thanks to @c_schwemmer, it’s now possible to easily integrate the HTML-ouput of all table-functions into knitr-rmarkdown-documents.… Read more "Direct integration of sjPlot-tables in knitr-rmarkdown-documents #rstats"

Read more »

PCA – hierarchical tree – partition: Why do we need to choose for visualizing data?

February 20, 2017
By
PCA – hierarchical tree – partition: Why do we need to choose for visualizing data?

Principal component methods such as PCA (principal component analysis) or MCA (multiple correspondence analysis) can be used as a pre-processing step before clustering. But principal component methods give also a framework to visualize data. Thus, the clustering methods can be represented onto the map provided by the principal component method. In the figure below, the hierarchical tree

Read more »

Naive Bayes: A Generative Model and Big Data Classifier

November 2, 2016
By

.fusion-fullwidth-1 { padding-left: px !important; ...

Read more »

Correspondence Analysis in Tableau with R

September 23, 2016
By
Correspondence Analysis in Tableau with R

Correspondence analysis is an exploratory data analysis method for discovering relationships between two or more categorical variables. It is very often used for visualizing survey data since if the matrix is large enough (which could be due to large number of variables but also possible with small number of variables with high cardinality) visual inspection

Read more »

Complex Tables – Exercises

April 26, 2016
By
Complex Tables – Exercises

The ftable() function combines Cross-Tabulation with the ability to format , or “flatten”, contingency tables of 3 or more dimensions. The resulting tables contain the combined counts of the categorical variables, (also factor variables in R), that are then arranged as a matrix, whose rows and columns correspond to the original data’s rows and columns.

Read more »

Data Exploration with Tables exercises

April 20, 2016
By
Data Exploration with Tables exercises

The table() function is intended for use during the Data Exploration phase of Data Analysis. The table() function performs categorical tabulation of data. In the R programming language, “categorical” variables are also called “factor” variables. The tabulation of data categories allows for Cross-Validation of data. Thereby, finding possible flaws within a dataset, or possible flaws

Read more »

Importing Data Into R – Part Two

August 18, 2015
By
Importing Data Into R – Part Two

In this follow-up tutorial of This R Data Import Tutorial Is Everything You Need-Part One, DataCamp continues with its comprehensive, yet easy tutorial to quickly import data into R, going from simple, flat text files to the more advanced SPSS and SAS files. As a lot of our readers noticed correctly from the first post, The post

Read more »

I loved this %>% crosstable

July 28, 2015
By

This is a public tank you for @heatherturner's contribution. Now the SciencesPo's crosstable can work in a chain (%>%) fashion; useful for using along with other packages that have integrated the magrittr operator. > candidatos %>% + filter(desc_cargo == 'DEPUTADO ESTADUAL'| desc_cargo =='DEPUTADO DISTRITAL' | desc_cargo =='DEPUTADO FEDERAL' | desc_cargo =='VEREADOR' | desc_cargo =='SENADOR') %>%

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)