# NOT RUN {
#Load the file
dataset <- read.csv2(system.file("extdata",
"nhdsSubset.csv",
package="EHRtemporalVariability"),
sep = ",",
header = TRUE,
na.strings = "",
colClasses = c( "character", "numeric", "factor",
"numeric" , rep( "factor", 22 ) ) )
#Format the date
datasetFormatted <- EHRtemporalVariability::formatDate( input = dataset,
dateColumn = "date",
dateFormat = "%y/%m")
#Apply the estimateDataTemporalMap
probMaps <- estimateDataTemporalMap( data = datasetFormatted,
dateColumnName = "date",
period = "month")
# }
# NOT RUN {
For a larger example download the following .csv dataset and continue the steps as above:
inputFile <- "http://github.com/hms-dbmi/EHRtemporalVariability-DataExamples/raw/master/nhdsSubset.csv"
dataset <- read.csv2( inputFile,
sep = ",",
header = TRUE,
na.strings = "",
colClasses = c( "character", "numeric", "factor",
"numeric" , rep( "factor", 22 ) ) )
# }
Run the code above in your browser using DataCamp Workspace