Skip to content

Commit

Permalink
make rprojroot to work if the directory name is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Aug 22, 2020
1 parent 8b4ee28 commit 00abfff
Show file tree
Hide file tree
Showing 147 changed files with 146 additions and 146 deletions.
Empty file added .ROS-Examples-root
Empty file.
2 changes: 1 addition & 1 deletion AgePeriodCohort/births.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Load data
births <- read.table(root("AgePeriodCohort/data","births.txt"), header=TRUE)
Expand Down
2 changes: 1 addition & 1 deletion AgePeriodCohort/births.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Load data
Expand Down
2 changes: 1 addition & 1 deletion AgePeriodCohort/births_letter.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' **Load packages**
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' **Initialize running the first part**
#+ results='hide'
Expand Down
2 changes: 1 addition & 1 deletion AgePeriodCohort/births_letter.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

**Initialize running the first part**
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_apc.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_apc.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_building.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_building.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_building_optimizing.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_building_optimizing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Arsenic/arsenic_logistic_residuals.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
invlogit <- plogis
Expand Down
2 changes: 1 addition & 1 deletion Balance/treatcontrol.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Plot figures
bell <- function(filename, mu, sd, lo, hi, ymax){
Expand Down
2 changes: 1 addition & 1 deletion Balance/treatcontrol.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Plot figures
Expand Down
2 changes: 1 addition & 1 deletion Beauty/beauty.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion Beauty/beauty.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion CausalDiagram/diagrams.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Plot causal diagram
#+ eval=FALSE, include=FALSE
Expand Down
2 changes: 1 addition & 1 deletion CausalDiagram/diagrams.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Plot causal diagram
Expand Down
2 changes: 1 addition & 1 deletion CentralLimitTheorem/heightweight.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Summary data of height and weight distributions of women and men
height_counts_women <- c(80,107,296,695,1612,2680,4645,8201,9948,11733,10270,9942,6181,3990,2131,1154,245,257,0,0,0,0)*10339/74167
Expand Down
2 changes: 1 addition & 1 deletion CentralLimitTheorem/heightweight.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Summary data of height and weight distributions of women and men
Expand Down
2 changes: 1 addition & 1 deletion Childcare/childcare.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstan")
library("arm")
library("rstanarm")
Expand Down
2 changes: 1 addition & 1 deletion Childcare/childcare.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstan")
library("arm")
library("rstanarm")
Expand Down
2 changes: 1 addition & 1 deletion Congress/congress.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")

#' #### Load data
Expand Down
2 changes: 1 addition & 1 deletion Congress/congress.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
```

Expand Down
2 changes: 1 addition & 1 deletion Coop/riverbay.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Load data
data <- read.table(root("Coop/data","Riverbay.csv"), header=FALSE, sep=",")
Expand Down
2 changes: 1 addition & 1 deletion Coop/riverbay.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Load data
Expand Down
2 changes: 1 addition & 1 deletion Coverage/coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#+ eval=FALSE, include=FALSE
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Simulate
n_rep <- 100
Expand Down
2 changes: 1 addition & 1 deletion Coverage/coverage.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE
```
```{r eval=FALSE, include=FALSE}
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Simulate
Expand Down
2 changes: 1 addition & 1 deletion CrossValidation/crossvalidation.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
library("ggplot2")
Expand Down
2 changes: 1 addition & 1 deletion CrossValidation/crossvalidation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("loo")
library("ggplot2")
Expand Down
2 changes: 1 addition & 1 deletion Death/polls.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("ggplot2")
theme_set(bayesplot::theme_default(base_family = "sans"))

Expand Down
2 changes: 1 addition & 1 deletion Death/polls.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("ggplot2")
theme_set(bayesplot::theme_default(base_family = "sans"))
```
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' #### Load data
earnings <- read.csv(root("Earnings/data","earnings.csv"))
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_bootstrap.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

#### Load data
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_compound.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_compound.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion Earnings/earnings_regression.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("ggplot2")
library("bayesplot")
Expand Down
2 changes: 1 addition & 1 deletion Earnings/height_and_weight.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")

#' #### Load data
Expand Down
2 changes: 1 addition & 1 deletion Earnings/height_and_weight.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ knitr::opts_chunk$set(message=FALSE, error=FALSE, warning=FALSE, comment=NA)

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
```

Expand Down
2 changes: 1 addition & 1 deletion ElectionsEconomy/bayes.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()

#' ## Calculations
#'
Expand Down
2 changes: 1 addition & 1 deletion ElectionsEconomy/bayes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
```

## Calculations
Expand Down
2 changes: 1 addition & 1 deletion ElectionsEconomy/hibbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ savefigs <- FALSE

#' #### Load packages
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("arm")
library("ggplot2")
Expand Down
2 changes: 1 addition & 1 deletion ElectionsEconomy/hibbs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ savefigs <- FALSE

```{r }
library("rprojroot")
root<-has_dirname("ROS-Examples")$make_fix_file()
root<-has_file(".ROS-Examples-root")$make_fix_file()
library("rstanarm")
library("arm")
library("ggplot2")
Expand Down
Loading

0 comments on commit 00abfff

Please sign in to comment.