View source: R/survival_digitize.R
survival_digitize | R Documentation |
A wrapper for the digitizer end-to-end process.
survival_digitize(
img_path,
bg_lightness = 0.3,
attempt_OCR = F,
word_sensitivity = 30,
num_curves,
censoring = F,
x_start,
x_end,
x_increment,
y_start,
y_end,
y_increment,
y_text_vertical,
nr_neighbors = 20,
enhance = F,
impute_size = 0,
line_censoring = F
)
img_path |
Location of the image file. |
bg_lightness |
A lightness threshold value between 0 and 1. Every pixel with lightness > bg_lightness is considered background and removed. Default value is 0.3. |
attempt_OCR |
Logical value indicating if Optical Character Recognition (OCR) should be attempted to remove words. Default value is FALSE. |
word_sensitivity |
Sensitivity for OCR word removal. Default value is 30. |
num_curves |
The number of curves in an image. |
censoring |
Logical value indicating if censoring is represented by black marks. Default value is TRUE. |
x_start |
Lowest X-axis label value. |
x_end |
Highest X-axis label value. |
x_increment |
Increment value for the X-axis ticks. Note: this should include increment between every tick, including minor ones. |
y_start |
Lowest Y-axis label. |
y_end |
Highest Y-axis label. |
y_increment |
Increment value for the Y-axis ticks. Note: this should include increment between every tick, including minor ones. |
y_text_vertical |
Boolean value indicating if the Y-axis labels are vertical (TRUE) or horizontal (FALSE). |
nr_neighbors |
Number of neighbors in k-nearest neighbors (knn) when grouping pixels by colors. Default value is 50. |
enhance |
Logical value indicating whether to convert HSL channels into the same scale. Default value is FALSE. |
impute_size |
Size parameter for imputation. It defines the number of time intervals for imputation. |
line_censoring |
Logical value indicating if line censoring removal should be attempted. Default value is FALSE. |
A dataframe with columns: 'id', 'times', 'St', and 'curve'.
## Not run:
survival_digitize(
img_path = here::here("OS.jpg"),
bg_lightness = 0.1,
attempt_OCR = FALSE,
num_curves = 2,
x_start = 0,
x_end = 10,
x_increment = 1,
y_start = 0,
y_end = 1,
y_increment = 0.2,
y_text_vertical = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.