Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

project template

  • Loading branch information...
commit 22c89d6fa5a790c7f228c4b477063fad60001b4c 1 parent e173356
@tlevine authored
View
37 analysis/README
@@ -0,0 +1,37 @@
+Welcome to ProjectTemplate!
+
+This file introduces you to ProjectTemplate, but you should eventually replace
+the contents of this file with an introduction to your project. People who
+work with your data in the future will thank you for it, including your future
+self.
+
+ProjectTemplate is an R package that helps you organize your statistical
+analysis projects. Since you're reading this file, we'll assume that you've
+already called `create.project()` to set up this project and all of its
+contents.
+
+To load your new project, you'll first need to `setwd()` into the directory
+where this README file is located. Then you need to run the following two
+lines of R code:
+
+ library('ProjectTemplate')
+ load.project()
+
+After you enter the second line of code, you'll see a series of automated
+messages as ProjectTemplate goes about doing its work. This work involves:
+* Reading in the global configuration file contained in `config`.
+* Loading any R packages you listed in he configuration file.
+* Reading in any datasets stored in `data` or `cache`.
+* Preprocessing your data using the files in the `munge` directory.
+
+Once that's done, you can execute any code you'd like. For every analysis
+you create, we'd recommend putting a separate file in the `src` directory.
+If the files start with the two lines mentioned above:
+
+ library('ProjectTemplate')
+ load.project()
+
+You'll have access to all of your data, already fully preprocessed, and
+all of the libraries you want to use.
+
+For more details about ProjectTemplate, see http://projecttemplate.net
View
0  analysis/TODO
No changes.
View
0  analysis/cache/.gitignore
No changes.
View
0  analysis/config/.gitignore
No changes.
View
8 analysis/config/global.dcf
@@ -0,0 +1,8 @@
+data_loading: on
+cache_loading: on
+munging: on
+logging: off
+load_libraries: off
+libraries: reshape, plyr, ggplot2, stringr, lubridate
+as_factors: on
+data_tables: off
View
1  analysis/data
View
0  analysis/diagnostics/.gitignore
No changes.
View
4 analysis/diagnostics/1.R
@@ -0,0 +1,4 @@
+# Example Data Diagnostics Script
+
+data <- rnorm(100000, 0, 1)
+expect_that(length(data) == 100000, is_true())
View
0  analysis/doc/.gitignore
No changes.
View
0  analysis/graphs/.gitignore
No changes.
View
4 analysis/lib/helpers.R
@@ -0,0 +1,4 @@
+helper.function <- function()
+{
+ return(1)
+}
View
0  analysis/logs/.gitignore
No changes.
View
0  analysis/munge/.gitignore
No changes.
View
1  analysis/munge/01-A.R
@@ -0,0 +1 @@
+# Example preprocessing script.
View
3  analysis/profiling/1.R
@@ -0,0 +1,3 @@
+# Example Profiling Script
+
+replicate(10, system.time(rnorm(100000, 0, 1)))
View
0  analysis/reports/.gitignore
No changes.
View
0  analysis/src/.gitignore
No changes.
View
8 analysis/src/eda.R
@@ -0,0 +1,8 @@
+library('ProjectTemplate')
+load.project()
+
+for (dataset in project.info$data)
+{
+ message(paste('Showing top 5 rows of', dataset))
+ print(head(get(dataset)))
+}
View
3  analysis/tests/1.R
@@ -0,0 +1,3 @@
+# Example Unit Testing Script
+
+expect_that(1, equals(1))
Please sign in to comment.
Something went wrong with that request. Please try again.