Excel Formatting Guide for R

1. Tidy Data Structure

Each row = one observation, each column = one variable:

PatientIDAgeEyePressureDiagnosis
0014521.5Normal
0025327.3Glaucoma Suspect
0036030.1Glaucoma

2. Variable Naming Rules

Bad: 1st Measure, Eye Pressure!, #Diagnosis
Good: first_measure, eye_pressure, diagnosis

3. Consistent Data Types

4. No Merged Cells

Unmerge all cells. Each cell should contain one value only.

5. Single Header Row

Use only one header row. Do not include titles or notes above it.

6. No Blank Rows or Columns

Delete any blank rows or columns in your spreadsheet.

7. No Calculated Fields

If using formulas, copy and paste as values before saving.

8. Save in CSV Format

File → Save As → CSV (Comma delimited) (*.csv)

9. Avoid Metadata and Decorations

Remove colors, comments, hyperlinks, and images.

10. Test the File in R

data <- read.csv("your_file.csv")
head(data)
str(data)

This helps verify correct import and data types.