Definitions – Databases, Queries, Relational Databases, SQL, MySQL A database is a structured collection of records or data that is stored in a computer system.…
View More RMySQL ExamplesCategory: R
Export Data Frames To Multi-worksheet Excel File
A few weeks ago I needed to export a number of data frames to separate worksheets in an Excel file. Although one could output csv-files…
View More Export Data Frames To Multi-worksheet Excel FileR Apply Family
# Apply Functions Over Array Margins apply; sweep; scale # Apply a Function over a List or Vector lapply; sapply; vapply; replicate; rapply # Apply…
View More R Apply FamilyLook up (and Replace) values in data frame based on lookup table (with more than one column)
I’m trying to find the most elegant (simple and concise) way of replacing the value of certain columns based on matching two columns from another…
View More Look up (and Replace) values in data frame based on lookup table (with more than one column)Lookup Performance in R
Recently, I became interested in maximizing lookup performance in R. Many problems require looking up values in tables. I decided to perform some tests to…
View More Lookup Performance in RModifying data with lookup tables
In many analyses, data is read from a file, but must be modified before it can be used. For example you may want to add…
View More Modifying data with lookup tablesGrouping and Sorting in R
Basically, using R I would like to take a data set that looks like this: And transform it to look like this: Notice that the…
View More Grouping and Sorting in RR Grouping functions: sapply vs. lapply vs. apply. vs. tapply vs. by vs. aggregate vs
R has many *apply functions which are ably described in the help files (e.g. ?apply). There are enough of them, though, that beginning useRs may have…
View More R Grouping functions: sapply vs. lapply vs. apply. vs. tapply vs. by vs. aggregate vsHow to join data frames in R (inner, outer, left, right)?
Given two data frames df1 = data.frame(CustomerId=c(1:6),Product=c(rep(“Toaster”,3),rep(“Radio”,3))) df2 = data.frame(CustomerId=c(2,4,6),State=c(rep(“Alabama”,2),rep(“Ohio”,1))) > df1 CustomerId Product 1 Toaster 2 Toaster 3 Toaster 4 Radio 5 Radio…
View More How to join data frames in R (inner, outer, left, right)?Text Mining the Complete Works of William Shakespeare
(This article was first published on Exegetic Analytics » R, and kindly contributed to R-bloggers) I am starting a new project that will require some serious…
View More Text Mining the Complete Works of William Shakespeare