Commit 3e3548ac authored by de Freitas Costa, Eduardo's avatar de Freitas Costa, Eduardo
Browse files

Scripts adjustment

parent 751714e5
This diff is collapsed.
......@@ -16,12 +16,12 @@ output:
#header #################################################################################
#'veal_calves.R'
#Title: title
#Project ID: pid
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: description
#Description: Descriptive and logistic regressions used for Teresita's paper. Association of ESBL and time/atm use
#Start date: date
#Last Update: {6:date}
......@@ -31,13 +31,26 @@ output:
#Dependencies
#<-Downstream
#- none
#->Upstream
#- main.R
#Input:
#-
#- Data/Raw/veal_calves2.xlsx
#- Data/Raw/age.xlsx.xlsx
#- Data/Raw/transport.xlsx
#- Data/Raw/batches.xlsx
#- Data/Raw/batches.xlsx
#- Data/Raw/ab_use.xlsx, sheet=export2
#- Data/Raw/ab_use.xlsx, sheet=export4
#- Data/Raw/Group_abuse2.xlsx,sheet=Days
#- Data/Raw/Group_abuse2.xlsx,sheet=Times
#Output:
#-
#- Figures/boxplot.jpg
#- Figures/FigS1.jpg
#- Data/Processed/veal_calves.csv
#Peer reviewer(s)
......
This diff is collapsed.
#header #################################################################################
#'multi_directional.R'
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: Auxiliary scripts for running the figures for the paper of bidirectional ESBL source attribution.
#Start date: date
#Last Update: {6:date}
#R version: r.version
#Scriptversion: version
#Dependencies
#<-Downstream
#- none
#->Upstream
#- none
#Input:
#- Output/chicken/cena.rds
#- Output/chicken_risk/scenario1/data1.txt
#- Output/chicken/cena.rds
#Output:
#- none
#Peer reviewer(s)
#Please ensure directories are relative. Please comment code sufficiently.
#Script start#############################################################################
library(ggplot2)
library(tidyverse)
# Final risk/week
risk <- read.csv("C:/Users/defr001/OneDrive - WageningenUR/MADRA2/Output/chicken_risk/scenario1/data1.txt", sep="")
risk <- read.csv(here("Output","chicken_risk","scenario1","data1.txt"), sep="")
1-((1-risk$r1[dim(risk)[1]])*(1-risk$r2[dim(risk)[1]])*(1-risk$r3[dim(risk)[1]])*(1-risk$r4[dim(risk)[1]]))
......@@ -22,7 +60,7 @@ cbind("NA",tail(risk$ere10,n=1),tail(risk$ere9,n=1),"NA","NA")
#Final colonization week 200
colo <- read.csv("C:/Users/defr001/OneDrive - WageningenUR/MADRA2/Output/chicken/scenario1/data1.txt", sep="")
colo <- read.csv(here("Output","chicken","scenario1","data1.txt"), sep="")
colo1.2<- gather(colo,key="pop",value="prop")
colo1.2$time<-rep(seq(1,200,1),4)
......@@ -54,7 +92,7 @@ colo2$pop<-as.factor(colo2$pop)
# Data gathering for tornados
cena <- readRDS("C:/Users/defr001/OneDrive - WageningenUR/MADRA2/Output/chicken/cena.rds")
cena <- readRDS(here("Output","chicken","cena.rds"))
nome2<-nome1[2:8]
nome3<-nome1[c(9:18,21:simtable)]
......
This diff is collapsed.
......@@ -15,12 +15,12 @@ output:
#header #################################################################################
#'veal_calves.R'
#Title: title
#Project ID: pid
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: description
#Description: Factors associated to ESBL in dayry farms. Results not used
#Start date: date
#Last Update: {6:date}
......@@ -30,13 +30,16 @@ output:
#Dependencies
#<-Downstream
#- none
#->Upstream
#- none
#Input:
#-
#- Data/Raw/veal_calves.xlsx
#Output:
#-
#- none
#Peer reviewer(s)
......
This diff is collapsed.
#header #################################################################################
#'multi_directional.R'
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: Scripts for running the bidirectional ESBL source attribution.
#Start date: date
#Last Update: {6:date}
#R version: r.version
#Scriptversion: version
#Dependencies
#<-Downstream
#- Data/inputs.R
#->Upstream
#- main.R
#Input:
#-inputs.R
#Output:
#- Several files whith the results for each scenario, 200 weeks. See folder Output/chicken, Output/chicken_cont, and Output/chicken_risk
#Peer reviewer(s)
#Please ensure directories are relative. Please comment code sufficiently.
#Script start#############################################################################
model<-function(iteraction,times,flocks,simtable){
......
#header #################################################################################
#'multi_directional.R'
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: Scripts for running the multidirectional ESBL source attribution
#Start date: date
#Last Update: {6:date}
#R version: r.version
#Scriptversion: version
#Dependencies
#<-Downstream
#- Data/inputs.R
#->Upstream
#- main.R
#Input:
#- inputs.R
#Output:
#- Several files whith the results for each scenario, 200 weeks. See folder Output/multi, Output/multi_cont, and Output/multi_risk
#Peer reviewer(s)
#Please ensure directories are relative. Please comment code sufficiently.
#Script start#############################################################################
model<-function(iteraction,times,flocks,batches,simtable){
......
......@@ -15,12 +15,12 @@ output:
#header #################################################################################
#'veal_calves.R'
#Title: title
#Project ID: pid
#Title: MADRA
#Project ID: 1600001916
#Client: client
#Author: <Eduardo> <Costa>, Wageningen Bioveterinary Research
#Description: description
#Description: Survival analysis to estimate the rate of acquiring and lose cariership ESBL status in VC.
#Start date: date
#Last Update: {6:date}
......@@ -30,13 +30,17 @@ output:
#Dependencies
#<-Downstream
#- none
#->Upstream
#- main.R
#Input:
#-
#- Data/Raw/veal_calves2.xlsx
#- Data/Raw/Group_abuse2.xlsx
#Output:
#-
#- none
#Peer reviewer(s)
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment