Learn R Programming

penaltyLearning (version 2020.5.13)

largestContinuousMinimumR: largestContinuousMinimumR

Description

Find the run of minimum cost with the largest size. This function uses a two pass R implementation, and is meant for internal use. Use targetIntervals for real data.

Usage

largestContinuousMinimumR(cost, 
    size)

Arguments

cost

numeric vector of cost values.

size

numeric vector of interval size values.

Value

Integer vector length 2 (start and end of target interval relative to cost and size).

Examples

Run this code
# NOT RUN {
library(penaltyLearning)
data(neuroblastomaProcessed, envir=environment())
one.problem.error <-
  neuroblastomaProcessed$errors[profile.id=="4" & chromosome=="1"]
indices <- one.problem.error[, largestContinuousMinimumR(
  errors, max.log.lambda-min.log.lambda)]
one.problem.error[indices[["start"]]:indices[["end"]],]

# }

Run the code above in your browser using DataLab