Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R Code #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions R Code/file statistics.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "File: fts_incoming_funding_som.csv R Notebook"
output:
html_document:
df_print: paged
word_document: default
---


```{r, echo=FALSE, include=FALSE}
file1 <- read.csv("fts_incoming_funding_som.csv", header = TRUE, stringsAsFactors = FALSE)
# remove 1st row with var descriptions
file1 <- file1[-1,]
#head(file1,2) #delete 1st row - description of variable
file1[,4] <- as.numeric(file1[,4])
file1[,31] <- as.numeric(file1[,31])
file1[file1==""]<-NA
```
File dimensions (row, column): `r dim(file1)`

File structure:
```{r echo=FALSE}
str(file1)
```

```{r, echo=FALSE, include=FALSE}
sum(is.na(file1))
totalEntries1 = nrow(file1)*ncol(file1)
percentNA_file1 = sum(is.na(file1))/totalEntries1
```

Percent of Null entries to total entries: `r percentNA_file1`


```{r, echo=FALSE,include=FALSE}
statFile <- file1[c("amountUSD","originalAmount")]
```
Summary statistics for variables amountUSD and originalAmount
```{r, echo=FALSE}
summary(statFile)
```
40 changes: 40 additions & 0 deletions R Code/file2-statistics.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "File: fts_internal_funding_som.csv R Notebook"
output:
html_document:
df_print: paged
word_document: default
---


```{r, echo=FALSE, include=FALSE}
file1 <- read.csv("fts_internal_funding_som.csv", header = TRUE, stringsAsFactors = FALSE)
# remove 1st row with var descriptions
file1 <- file1[-1,] #delete 1st row - description of variable
file1[,4] <- as.numeric(file1[,4])
file1[,31] <- as.numeric(file1[,31])
file1[file1==""]<-NA
```
File dimensions (row, column): `r dim(file1)`

File structure:
```{r echo=FALSE}
str(file1)
```

```{r, echo=FALSE, include=FALSE}
sum(is.na(file1))
totalEntries1 = nrow(file1)*ncol(file1)
percentNA_file1 = sum(is.na(file1))/totalEntries1
```

Percent of Null entries to total entries: `r percentNA_file1`


```{r, echo=FALSE,include=FALSE}
statFile <- file1[c("amountUSD","originalAmount")]
```
Summary statistics for variables amountUSD and originalAmount
```{r, echo=FALSE}
summary(statFile)
```
Loading