<commit_before>---
layout: post
title: Read and Write CSVs in R
categories: HMIS, R, SQL
excerpt: 
tags: [ETO, HMIS, R, SQL]
image: 
    feature: R_SQL.png
comments: true
custom_css:
custom_js: 
---

# Read and Write CSVs in R
R let's us work with HMIS data, but there is still the problem of how to load the data into R from a source.  R is actually pretty neat regarding data importing.  One can load data from a website, SQL database, text file, Excel file, or CSV.

When working with HMIS data the two most common types of data source are Excel and CSV.  Therefore, it's going to pay to spend a little time on how to bring those files into R.

## Importing CSVs into R
CSV stand for Comma Separated Value format.  It is a near ancient file format which is used to store data in rows and columns.  If you have a CSV file on the computer (in Windows) right-click on it and open it in Notepad.  The contents should look something like this:<commit_msg>Blogging 2017-07-02<commit_after>---
layout: post
title: Read and Write CSVs in R
categories: HMIS, R, SQL
excerpt: 
tags: [ETO, HMIS, R, SQL]
image: 
    feature: R_SQL.png
comments: true
custom_css:
custom_js: 
---

R let's us work with HMIS data, but there is still the problem of how to load the data into R from a source.  R is actually pretty neat regarding data importing.  One can load data from a website, SQL database, text file, Excel file, or CSV.

When working with HMIS data the two most common types of data source are Excel and CSV.  Therefore, it's going to pay to spend a little time on how to bring those files into R.

## Importing CSVs into R
CSV stand for Comma Separated Value format.  It is a near ancient file format which is used to store data in rows and columns.  If you have a CSV file on the computer (in Windows) right-click on it and open it in Notepad.  The contents should look something like this:
{'fraction_non_alphanumeric': 0.053580901856763924, 'fraction_numerical': 0.004244031830238726, 'mean_word_length': 3.6799007444168734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4111736', 'n_tokens_mistral': 577, 'n_tokens_neox': 537, 'n_words': 332}