Learn R Programming

apollo (version 0.1.0)

apollo_detach: Detaches parameters and the database.

Description

Detaches variables attached by apollo_attach.

Usage

apollo_detach(apollo_beta = NA, apollo_inputs = NA)

Arguments

apollo_beta

Named numeric vector. Names and values for parameters.

apollo_inputs

List grouping most common inputs. Created by function apollo_validateInputs.

Value

Nothing.

Details

This function detaches the variables attached by apollo_attach. It should be called at the end of apollo_probabilities, only if apollo_attach was called and the beginning. This can be achieved by adding the line on.exit(apollo_detach(apollo_beta, apollo_inputs)) right after calling apollo_attach. This function can also be called without any arguments, i.e. apollo_detach().

Examples

Run this code
# NOT RUN {
apollo_beta  <- c(b1=0.3, b2=-0.5)
apollo_fixed <- c()
apollo_control <- list(indivID="id", mixing = FALSE, panelData = FALSE)
database <- data.frame(id=1:100, x1=stats::runif(100), x2=stats::runif(100))
apollo_inputs <- apollo_validateInputs()
apollo_attach(apollo_beta, apollo_inputs)
V = b1*x1 + b2*x2
apollo_detach(apollo_beta, apollo_inputs)
# }

Run the code above in your browser using DataLab