Error Message, Please help!

I am getting this error message and wanted to know how to fix it,
Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
In storage.mode(x) <- "double" : NAs introduced by coercion

history <- dbReadTable(con,"NYC_HISTORICAL")
combine2<-
history %>%
left_join(y=neighboorhood, by= "NEIGHBORHOOD_ID" )

filter9<-
combine2%>%
filter(NEIGHBORHOOD_NAME=="ASTORIA")%>%
group_by(RESIDENTIAL_UNITS)%>%
group_by(YEAR_BUILT)%>%
filter(YEAR_BUILT>="2009")

set.seed(123)
k3 <- kmeans(filter9, centers=3, nstart=25)

This can't be properly diagnosed without a reprex (see the FAQs). It may be due to the failure of the filter9 code highlighted. To do numeric filtering on YEAR_BUILT it should be numeric, not character.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.