Description Usage Arguments Value Note
This is a simple routine that will do subsampling by copying the first lines to a temporary file and return this.
1 | subsampleDataByCutoff(filepath = "", subsamplingRate = -1)
|
filepath |
path of the file to subsample |
subsamplingRate |
rate to subsample. in case this is a value between 0..1.0000000001, it will be interpreted as a fraction, e.g. 0.5 means subsampling half of the file. If the rate is above 1.0000000001, the value is taken as the absolut number of data points, e.g. 50 will subsample exactly 50 points (the first 50 of the file). If anything above 1.00..1 is given, this number will be floored first, so 50.9 lines will yield 50 lines. |
subsampledFile a file containing the subsampled file
if the subsamplingRate == 1 then no copy is done, but the file itself is returned.
a temporary file will be created (in case any subsampling has to be done)– this will stay until the R session finishes.
there is no way to subsample just ONE line from the file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.