knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

DS401

R-CMD-check

The goal of the DS401 R package is to assess quality of 3d topographics scans in form of x3p images.

Installation

You can install the development version of DS401 from GitHub with:

# install.packages("devtools")
devtools::install_github("heike/DS401")

Example

library(DS401)
## basic example code
library(x3ptools)

This scan has a lot of problems

x3p_image(fau277_bb_l2, file = "man/figures/fau277_bb_l2.png")
knitr::include_graphics("man/figures/fau277_bb_l2.png")

This scan is about as good as we can hope for

x3p_image(fau001_ba_l1, file = "man/figures/fau001_ba_l1.png")
knitr::include_graphics("man/figures/fau001_ba_l1.png")

The DS401 package combines a set of functions assessing the quality of scans.

Feature extracted

Overall number of missing values

extract_na calculates the percentage of values that are missing in the surface matrix of the scan. For the scans shown above, the percentages are quite high for the bad scan and low for the good scan

extract_na(fau277_bb_l2)
extract_na(fau001_ba_l1)

col_na Function

The col_na function's goal is to distinguish between good and bad scans based on the proportion of columns with large proportions of missing values. It takes in three parameters, which are an x3p object, a percentage to be used as the number acceptable percentage of missing values in a column, and the proportion that bad columns that is the threshold for a good scan.

assess_col_na(fau277_bb_l2)
assess_col_na(fau001_ba_l1)

Assess Median NA Proportion

'assess_median_na_proportion' calculates the median proportion of NA values present in the middle of a 3d scan from a specific number of different y values. Specifically this variable is calculating the amount of feathering occuring in the 3d scans.

assess_median_na_proportion(fau277_bb_l2)# This scan seems to have a problem with feathering
assess_median_na_proportion(fau001_ba_l1)# good scan

Assess Bottom Empty

assess_bottomempty(fau277_bb_l2)
assess_bottomempty(fau001_ba_l1)

Assess Middle NA Proportion

assess_middle_na_proportion(fau277_bb_l2)
assess_middle_na_proportion(fau001_ba_l1)

Assess Percentile NA Proportion

assess_percentile_na_proportion(fau277_bb_l2)
assess_percentile_na_proportion(fau001_ba_l1)

Assess Rotation

assess_rotation(fau277_bb_l2)
assess_rotation(fau001_ba_l1)

Extract Median NA Proportion

extract_median_na_proportion(fau277_bb_l2)
extract_median_na_proportion(fau001_ba_l1)

Predictions

predict_quality(list(fau277_bb_l2, fau001_ba_l1), c(1,1))


heike/DS401 documentation built on Oct. 23, 2022, 1:39 p.m.