Closed mjhendrickson closed 6 years ago
Not an issue upon initial build. Only results in error when starting new session and loading full data file from .csv via:
write_csv(HxMx, "HxMx.csv")
Restart R / start new session, then
HxMx = read.csv("HxMx.csv")
HxMx = read.csv("HxMx.csv")
is bringing data in as a different type than intially imported and created.
Using readr
instead of base import resolves the issue and pulls data into RStudio as expected.
Changed HxMx = read.csv("HxMx.csv")
to HxMx <- read_csv("HxMx.csv")
in 3.Exploratory Data Analysis.R
HxMx %>% summarize( mean = mean(start_time_DI, na.rm = TRUE), med = median(start_time_DI, na.rm = TRUE), iqr = IQR(start_time_DI, na.rm = TRUE), mad = mad(start_time_DI, na.rm = TRUE), min = min(start_time_DI, na.rm = TRUE), max = max(start_time_DI, na.rm = TRUE), n = n() )
Results in
Error in summarise_impl(.data, dots) : Evaluation error: need numeric data.