update.evolaFitMod {evola}R Documentation

update form an evolafit model

Description

update method for class "evolaFitMod".

Usage

## S3 method for class 'evolaFitMod'
update(object, formula., evaluate = TRUE, ...)

Arguments

object

an object of class "evolaFitMod"

formula.

an optional formula

evaluate

a logical value to indicate if an evaluation of the call should be done or not

...

Further arguments to be passed

Value

an updated model

Author(s)

Giovanny Covarrubias

Examples


set.seed(1)

# Data
Gems <- data.frame(
  Color = c("Red", "Blue", "Purple", "Orange",
            "Green", "Pink", "White", "Black", 
            "Yellow"),
  Weight = round(runif(9,0.5,5),2),
  Value = round(abs(rnorm(9,0,5))+0.5,2),
  Times=c(rep(1,8),0)
)
# Task: Gem selection. 
# Aim: Get highest combined value.
# Restriction: Max weight of the gem combined = 10. 

# simple specification
res<-evolafit(formula=cbind(Weight,Value)~Color, dt= Gems,
               # constraints on traits: if greater than this ignore
               constraintsUB = c(10,Inf), nGenerations = 2
)
resUp=update(res)

[Package evola version 1.0.5 Index]