Say I have a dataframe for plotting scatterplot. The dataframe would be organized in the following fashion (in CSV format):
name ABC EFG1 32 452 56 67 to, say 200 000 entries I am going to first do a scatterplot, after which I am going to subset a portion of the dataset into A using alphahull and export them as XYZ. The script for doing this: #plot first plot containing all data plot(x = X$ABC, y = X$EFG, pch=20,) #subset data using ahull. choose 4 points on the plot A <- ahull(locator(4, type="p", pch=20), alpha=10000) #exporting subset XYZ <- {}for (i in 1:nrow(X)) { if (inahull(A, c(X$ABC[i],X$EFG[i]))) XYZ <- rbind(X,X[i,])} I am getting the following message if the number of data points in the subset that I choose is too large:Error in if (p[2] > a + b * p[1]) { : missing value where TRUE/FALSE needed Does anyone know what might be causing the problem? Any help is much appreciated! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.