rm(list=ls())
library(dplyr)
library("rpivotTable")
library(tidyr)
library(tidyverse)
library(reshape)
library(reshape2)
input_path="C:\Users\agrawal.rahul\Documents\TBBD Landing\"
setwd(input_path)
date<-"03"
time<-"23"
name <- paste0("http://10.24.9.156//TBBD_NormalHub_Reports//Final_Result_for_LM_Snapshot_2022-Sep-",date,"_",time,".csv")
download.file(name,paste0(input_path,"Landing.csv"))
Landing1 <- read.csv("C:\Users\agrawal.rahul\Documents\TBBD Landing\Landing.csv")
Landing1$Total_landing <- Landing1$ReceivedToday + Landing1$ReceivedToday_RTO
Landing1<-select(Landing1,"HubName","Pincode","Total_landing")
Landing1$HubName
<-toupper(Landing1$HubName
)
sum(Landing1$Total_landing)
TBBD_Mapping1 <- read.csv("C:\Users\agrawal.rahul\Documents\TBBD Landing\TBBD Mapping.csv")
#TBBD_Mapping1 <- select(TBBD_Mapping1,"Pincode","HubName")
TBBD_Mapping1$HubName
<-toupper(TBBD_Mapping1$HubName
)
#Landing1$DH_1 <- TBBD_Mapping1$HubName[match(Landing1$Pincode,TBBD_Mapping1$Pincode)]
Landing2<- merge(Landing1,TBBD_Mapping1,by.x = "Pincode",by.y = "Pincode",all.x = T)
write.csv(Landing2,paste0(date,"_",time,"Final_landing.csv"))
####ERROR######
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file '03_23Final_landing.csv': Permission denied