Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 816 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 816 Bytes

R-import-sql-export

Starter R script with sample code for reading in data from Excel, performing SQL against it, and writing the file back to the disk

===================

===================

The code is organized in the following way--

Import:

  • Two examples for reading in .xlsx files
  • One for reading in .csv files
  • One for tab delimited .txt files

Inspect and Clean:

  • Count rows and columns
  • Print top and bottom 6 rows
  • Summary stats on each column
  • Search for missing values, NA values, and empty strings
  • Change column names with periods to underbars

SQL Examples:

  • Count rows without creating a table
  • Subquery
  • Where clause
  • Left join
  • Case statement

Export Examples:

  • .xlsx
  • .csv
  • .txt (tab delimited)