Blog Archives

Accessing Dataframe Objects Exercises

May 20, 2016
By
Accessing Dataframe Objects Exercises

The attach() function alters the R environment search path by making dataframe variables into global variables. If incorrectly scripted, the attach() function might create symantic errors. To prevent this possibility, detach() is needed to reset the dataframe objects in the search path. The transform() function allows for transformation of dataframe objects. The within() function creates

Read more »

Cross Tabulation with Xtabs exercises

May 12, 2016
By
Cross Tabulation with Xtabs exercises

The xtabs() function creates contingency tables in frequency-weighted format. Use xtabs() when you want to numerically study the distribution of one categorical variable, or the relationship between two categorical variables. Categorical variables are also called “factor” variables in R. Using a formula interface, xtabs() can create a contingency table, (also a “sparse matrix”), from cross-classifying

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 »

Merging Dataframes Exercises

April 14, 2016
By
Merging Dataframes Exercises

When combining separate dataframes, (in the R programming language), into a single dataframe, using the cbind() function usually requires use of the “Match()” function. To simulate the database joining functionality in SQL, the “Merge()” function in R accomplishes dataframe merging with the following protocols; “Inner Join” where the left table has matching rows from one,

Read more »

Search R-bloggers

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)