Open mtwelker opened 3 years ago
Prof. Howell, @AntJam-Howell
This code chunk, for the cluster analysis on the three neighborhood indices, runs fine within RStudio:
fit.ind <- Mclust( df.nhood.metrics ) summary( fit.ind ) tmap_mode("plot") tmap_style("white") tm_shape( den_dorling) + #, bbox=bb ) + tm_polygons( col="cluster.ind", palette="Accent" )
Here's what it produces:
But when I knit the file, I get this error: (Line 357 is the first line of the code chunk above.)
In case it helps, here's how I created cluster.ind:
df.pct <- sapply( d2, ntile, 100 ) d4 <- as.data.frame( df.pct ) d4$cluster.ind <- as.factor( paste0("GROUP-",fit.ind$classification) )
I think the error is related to the plot, not the cluster analysis, but knitting the file doesn't throw an error for an earlier plot (on the original cluster analysis with all the variables) that is virtually identical, starting at line 223:
tmap_mode("plot") tmap_style("white") tm_shape( den_dorling) + #, bbox=bb ) + tm_polygons( col="cluster", palette="Accent" )
I googled the error, but couldn't find a solution. Do you have any suggestions?
@mtwelker Hi Michelle, can you email me your RMD code. I will take a look. anthony.howell@asu.edu Best,
Thank you @AntJam-Howell ! I just sent it to you.
Prof. Howell, @AntJam-Howell
This code chunk, for the cluster analysis on the three neighborhood indices, runs fine within RStudio:
Here's what it produces:
But when I knit the file, I get this error: (Line 357 is the first line of the code chunk above.)
In case it helps, here's how I created cluster.ind:
I think the error is related to the plot, not the cluster analysis, but knitting the file doesn't throw an error for an earlier plot (on the original cluster analysis with all the variables) that is virtually identical, starting at line 223:
I googled the error, but couldn't find a solution. Do you have any suggestions?