I have a dataset containing sales quantities. There are decimal numbers in sales numbers, but they should not be. So I need to remove those lines. (SalesQuantity column is all numeric) My dataset is as follows.
CustomerAccount SalesDate ProductNumber SalesQuantity Cust00001 2014-01-06 PRD0001 2600 Cust00001 2014-01-06 PRD0002 200.5 Cust00001 2014-01-06 PRD0003 800 Cust00001 2014-01-06 PRD0004 882.5 Cust00002 2014-03-05 PRD0003 2400 Cust00002 2014-03-05 PRD0002 600
I was able to solve the problem by filtering by the remainder of the section, but I wonder if there is a function for the solution. Thanks.
float <- which(df$SalesQuantity %% 1 > 0)
df[float, ]
df <- df[-float, ]