Stefan Wyder

"You're always working on a project with at least 1 other collaborator,
and that is future you" Hadley Wickham
Anyone should be able to pick up the code and understand what is does.
Use
| Style 1 | Style 2 | ||
|---|---|---|---|
| Variables | avgExpr | avg_Expr | |
| Functions | CalculateAvgExpr() | Calculate_Avg_Expr() | |
| Constants | kConstantName |
see e.g. Google Stylesheet
Break down the problem into functions
One operation, one function
Different styles are possible. These are just some suggestions (learned the hard way)
df <- read.table("files/data.csv", header = TRUE)
rather than
df <- read.table("/home/wyder/PROJECTS/coexpression/files/data.csv", header = TRUE)
| load.R | load raw data | |
| clean.R | reformat and transform data, clean outliers, handles missing values | |
| functions.R | keep all functions in a separate file | |
| do.R | your actual analysis: loads, cleans data and does analysis |
www.bioconductor.org
Tools for the statistical analysis and comprehension of genomic data in the R programming language.
Also data integration.
Comments