getN {scClassify} | R Documentation

## Function to get the required N given by the accuracy and the learning curve model

### Description

Function to get the required N given by the accuracy and the learning curve model

### Usage

    getN(res, acc = 0.9)

### Arguments

`res` | model results returned by `learning_curve` function
`acc` | accuracy that are quired

### Value

sample size that are required

### Examples

    set.seed(2019)
    n <- seq(20, 10000, 100)
    accMat <- do.call(cbind, lapply(1:length(n), function(i){
    tmp_n <- rep(n[i], 50)
    y <- -2/(tmp_n^0.8) + 0.95 + rnorm(length(tmp_n), 0, 0.02)
    }))
    res <- learningCurve(accMat = accMat, n)
    N <- getN(res, acc = 0.9)

[Package scClassify version 1.4.0 Index]