How to remove the outliers from a dataset? I　have a dataset containing noise points. How can I remove lower and upper 1% data points using R?
 A: It depends on how many points. If it's hundreds or maybe a few thousand or so, the easiest way would be to sort the data and omit the first and last [n/100] points.
If it's a lot of points, you use O(n) quantile selection algorithms to identify the required quantiles and then omit the points outside them.
A: Generally, you can use either conditional indexing or subset() function. See basic examples here: http://www.statmethods.net/management/subset.html. It is not totally clear, though, what exactly do you mean by "lower and upper 1% of data points" criterion. The "by value" criterion doesn't make sense, as these data points would not be considered outliers. So, I assume that the criterion meant is "by number" of data points. For that, you would need to have some code along the following lines (obviously, where myData is a data frame):
mySize <- nrow(myData)
cutoffPercent <- 1  # adjust cutoff value, as needed
lowerLimit <- cutoffPercent * (mySize / 100) + 1
upperLimit <- mySize - lowerLimit
newData <- myData[lowerLimit:upperLimit, ]

