You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial CRAN submission version that contains functionality for working with UDS and HUD ZIP Code crosswalk files as well as Census Bureau ZCTA geometries and demographic data
stop("The 'year' value provided is invalid for 3-year American Community Survey data. Please provide a year between 2010 and 2013.")
113
118
}
114
119
115
-
if (output%in% c("tidy", "wide")==FALSE){
120
+
if (!output%in% c("tidy", "wide")){
116
121
stop("The 'output' requested is invalid. Please choose one of 'tidy' or 'wide'.")
117
122
}
118
123
119
-
if (survey%in% c("sf1", "sf3") ==TRUE){
124
+
if (!inherits(.data, what="data.frame")){
125
+
stop("The '.data' object provided is not a dataframe or dataframe like object. Please provide a dataframe.")
126
+
}
127
+
128
+
if (survey%in% c("sf1", "sf3")){
120
129
error<-"Input data appear to be malformed - there should be three columns for Decennial Census data: 'GEOID', 'variable', and 'value'. Note that zi_aggregate() only accepts 'tidy' data."
stop("ZCTA data passed to the 'zcta' argument are invalid. Please use 'zi_validate()' with the 'verbose = TRUE' option to investgiate further. The 'zi_repair()' function may be used to address issues.")
146
155
}
147
156
}
148
157
158
+
if (is.null(extensive) & is.null(intensive)){
159
+
stop("At least one of 'extensive' or 'intensive' must be provided.")
stop("The '.data' object provided is not a data frame.")
40
+
}
41
+
42
+
if (missing(input_var)){
43
+
stop("A value for 'input_var' is required.")
44
+
}
45
+
46
+
input_varQN<- as.character(substitute(input_var))
47
+
48
+
if (input_varQN%in% names(.data) ==FALSE){
49
+
stop("The given 'input_var' column is not found in your data object.")
50
+
}
51
+
52
+
valid<- zi_validate(x=.data[[input_varQN]])
53
+
54
+
if (valid==FALSE){
55
+
stop(paste0("Input ZIP Code data in the '", input_varQN, "' column are invalid. Please use 'zi_validate()' with the 'verbose = TRUE' option to investigate further. The 'zi_repair()' function may be used to address issues."))
0 commit comments