diff --git a/Campylobacter_environment_analysis_subset_one_variable_quantile.Rout b/Campylobacter_environment_analysis_subset_one_variable_quantile.Rout deleted file mode 100644 index c721c5644f4728c66250ba1974377ec9fd5743e4..0000000000000000000000000000000000000000 --- a/Campylobacter_environment_analysis_subset_one_variable_quantile.Rout +++ /dev/null @@ -1,174 +0,0 @@ - -R version 3.5.3 (2019-03-11) -- "Great Truth" -Copyright (C) 2019 The R Foundation for Statistical Computing -Platform: x86_64-pc-linux-gnu (64-bit) - -R is free software and comes with ABSOLUTELY NO WARRANTY. -You are welcome to redistribute it under certain conditions. -Type 'license()' or 'licence()' for distribution details. - - Natural language support but running in an English locale - -R is a collaborative project with many contributors. -Type 'contributors()' for more information and -'citation()' on how to cite R or R packages in publications. - -Type 'demo()' for some demos, 'help()' for on-line help, or -'help.start()' for an HTML browser interface to help. -Type 'q()' to quit R. - -[Previously saved workspace restored] - -> # The code does look at how the risk of Campylobacter in humans depends on environmental variables -> #The code uses old MEDMI data (not corrected for altitude) and analysis done on regular division of the range of the environemtal varaibles rather than quantile. -> -> -> rm(list=ls(all=TRUE)) -> # -> library(ISOweek) -> library(lubridate) - -Attaching package: ‘lubridate’ - -The following object is masked from ‘package:base’: - - date - -> library(ggplot2) -> require(MASS) -Loading required package: MASS -> library(scales) -> require(pheno) -Loading required package: pheno -Loading required package: nlme -Loading required package: SparseM - -Attaching package: ‘SparseM’ - -The following object is masked from ‘package:base’: - - backsolve - -Loading required package: quantreg -> library(timeDate) -> library(pastecs) -> library(stringi) -> library(timeSeries) -> #library(Hmisc) -> -> #list.of.packages <- c("xts") -> #new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] -> #if(length(new.packages)) install.packages(new.packages) -> library(xts) -Loading required package: zoo - -Attaching package: ‘zoo’ - -The following object is masked from ‘package:timeSeries’: - - time<- - -The following objects are masked from ‘package:base’: - - as.Date, as.Date.numeric - - -Attaching package: ‘xts’ - -The following objects are masked from ‘package:pastecs’: - - first, last - -> -> -> -> -> ## Variable file -> -> variable_int<-"humidity" -> variable_df_1<-read.csv(paste("../../Data_Base/OPIE_data_base/",variable_int,".csv",sep="")) -> humidity<-variable_df_1[,-c(1,2)] -> #dates<-as.Date(as.character(variable_df_1[-c(1,2),2]),format="%d/%m/%Y") -> -> dates_s<-as.Date(as.character(variable_df_1[-c(1,2),2]),format="%Y-%m-%d") -> dates<-rep(dates_s,times=length(variable_df_1)-2) -> All_PC_s<-names(variable_df_1[1,]) -> All_PC_s<-All_PC_s[-c(1,2)] -> All_PC<-rep(All_PC_s,each=length(dates_s)) -> -> -> width<-14 -> width_char<-paste(width) -> -> -> -> variable<-"Maximum_air_temperature" -> -> -> #variable_y<-"Mean_Precipitation" -> #variable<-"daylength" -> #variable<-"Mean_Precipitation" -> #"Maximum_air_temperature", -> #"Minimum_air_temperature", -> #"Mean_wind_speed", -> #"Mean_Precipitation", -> #"Relative_humidity", -> #"daylength" -> -> -> Env_Campylobacter_data_all2<-read.csv(paste("../../Data_Base/Cases_Environment/Simulated_Campylobacter_environment_",width_char,"_original_MEDMI.csv",sep="")) -> -> Env_Campylobacter_data_all2<-Env_Campylobacter_data_all2[,-1] -> colnames(Env_Campylobacter_data_all2)<-c("PostCode","Date","Cases", -+ "Maximum_air_temperature", -+ "Minimum_air_temperature", -+ "Mean_wind_speed", -+ "Cumul_Precipitation", -+ "Mean_Precipitation", -+ "Relative_humidity", -+ "daylength", -+ "residents") -> -> Env_laboratory_weekly<-read.csv(paste("../../Data_Base/Cases_Environment/Simulated_Laboratory_",width_char,"_original_MEDMI.csv",sep="")) -> Env_laboratory_weekly<-Env_laboratory_weekly[,-1] -> colnames(Env_laboratory_weekly)<-c("PostCode","Date", -+ "Maximum_air_temperature", -+ "Minimum_air_temperature", -+ "Mean_wind_speed", -+ "Cumul_Precipitation", -+ "Mean_Precipitation", -+ "Relative_humidity", -+ "daylength", -+ "residents") -> -> -> Env_Campylobacter_data_int1<-subset(Env_Campylobacter_data_all2,year(as.Date(Env_Campylobacter_data_all2$Date))>=1990 & year(as.Date(Env_Campylobacter_data_all2$Date))<=2015) -> Env_laboratory_int1<-subset(Env_laboratory_weekly,year(as.Date(Env_laboratory_weekly$Date))>=1990 & year(as.Date(Env_laboratory_weekly$Date))<=2015) -> -> -> -> ################### include latitude and longitude -> Coord_laboratory<-read.csv(paste("../../Data_Base/Cases/Lab_PostCodes.csv",sep="")) -> -> -> lat_long_lab<-data.frame(names(Coord_laboratory),as.numeric(Coord_laboratory[1,]),as.numeric(Coord_laboratory[2,]))# -> colnames(lat_long_lab)<-c("PostCode","lat","long") -> -> Env_laboratory_int2<-merge(Env_laboratory_int1,lat_long_lab,by="PostCode") -> Env_laboratory_int3<-data.frame(Env_laboratory_int2) -> -> Env_Campylobacter_data_int2<-merge(Env_Campylobacter_data_int1,lat_long_lab,by="PostCode") -> Env_Campylobacter_data_int3<-data.frame(Env_Campylobacter_data_int2) -> -> -> -> ######################## include daylength ################## -> -> PC_df<-data.frame(All_PC,as.Date(dates)) -> colnames(PC_df)<-c("PostCode",Date") -+ -+ Post_Codes_df<-merge(PC_df,lat_long_lab,by="PostCode") -Error: unexpected string constant in: -" -Post_Codes_df<-merge(PC_df,lat_long_lab,by="" -Execution halted