This report is intended to calculate the sum and mean for the payment values for a number of projects and for producing a subset of projects that are 50% or more completed but havenโt been fully completed yet. This report was created on Sun Apr 07 12:06:41 2019.
#Import dataset
getwd()
## [1] "C:/Users/borjaureta/Desktop/mydata"
fed_stimulus <- read.csv("Use_of_ARRA_Stimulus_Funds.csv")
#change to lower
names(fed_stimulus) <- tolower(names(fed_stimulus))
#Compute sum and mean for the payment value column
sum(fed_stimulus$payment.value, na.rm = TRUE)
## [1] 3180464994
mean(fed_stimulus$payment.value, na.rm = TRUE)
## [1] 242044.5
#Create a subset for projects status = "completed 50% or more". Do not include fully completed projects
subs <- subset(x = fed_stimulus, subset = (project.status == "Completed 50% or more") & !(project.status == "Fully Completed"), select = )
The conclusion obtained from the analysis is that the sum of payment value for all the projects was 3.18046510^{9} USD and the mean payment value was 2.420445210^{5} USD.
Furthermore, a total of 4908 project were identified as being 50% or more completed and not fully completed to date.
This report has been published in RPubs and can be found under the following link: