deleteViews: Delete individual views from view objects

Description Usage Arguments Value Author(s) See Also Examples

View source: R/deleteViews.r

Description

A generic function that allows one to delete individual views from objects of class BLViews or COPViews. The inputs are a view object and a numeric vector of views to delete, where the entires of the vector map to rows of the pick matrix.

Usage

1
deleteViews(views, viewsToDel)

Arguments

views

An object of class BLViews or COPViews

viewsToDel

A numeric vector of views to delete, as described above

Value

The original object with the indicated views deleted

Author(s)

Francisco Gochez <fgochez@mango-solutions.com>

See Also

BLViews-class, COPViews-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    stocks <- colnames(monthlyReturns)
    pick <- matrix(0, ncol = 6, nrow = 2, dimnames = list(NULL, stocks))
    pick[1,"IBM"] <- 1
    pick[1, "DELL"] <- 0.04
    pick[2, "C"] <- 1
    pick[2, "JPM"] <- 0.6

    confidences <- 1 / c(0.7, 0.1)

    views <- BLViews( P = pick, q = c(0.1,0.1) , confidences = confidences,stocks)
    deleteViews(views, 1)
   

BLCOP documentation built on Jan. 26, 2021, 1:05 a.m.