I have a large dataset that I m analyzing in R and I m interested in one column or vector of information. Each entry in this vector has a varied number (ranging from 1-5) of significant figures, and I want to subset this vector so I m not seeing data with only one significant digit. What kind of test or function can I use to get R to report the number of significant figures for each entry? I ve looked into the signif() function but that is more for rounding data to a specified number of significant digits, not querying how many sig figs are there.
Example: Suppose I have this vector:
4
28.382
120
82.3
100
30.0003
I want to remove the entries that only have one significant digit. That would be entries 1 (value of 4) and entry 5 (value of 100). I know how to subset data in R, but I don t know how to tell R to "find" all the values with only one significant figure.