I want to create two tables, past_90_am, and past_90_pm for observations made before & after noon, respectively.
######## Working With Entire_Health_Database.tab file
######## Set working Directory
setwd("/Users/georgemanning/Documents/datafiles/R_Projects")
######
######
#Get the Tidyverse package
library(tidyverse)
#Get Lubridate package
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
##### Now we have to read the file & assign it to a tibble
#####
library(readxl)
Entire_Health_Database <- read_excel("Entire_Health_Database.xlsx",
col_types = c("date", "date", "numeric",
"numeric", "numeric", "numeric",
"numeric", "text"))
#View(Entire_Health_Database)
past_90 <- Entire_Health_Database %>% filter(Date >= today()- days(90))
###
penultimate_90 <- Entire_Health_Database %>% filter(Date >= today()-days(180) & Date <= today()- days(91))
### Next is to extract observations between 0000 & 1159 and those between 1200 & 2359
### I have no idea how to do this yet
## Want to create two new dataframes/tibbles, one containing observations from past_90
## made berfore noon and a second containing observations made after noon.
## past_90 %>% filter("Time", hour()<12)
## The above doesn't work
## Still trying to figure this out
Created on 2019-07-04 by the reprex package (v0.3.0)