% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modifyVector.R
\name{modifyVector}
\alias{modifyVector}
\title{Modifies Elements of a Vector}
\usage{
modifyVector(x, val, add = TRUE)
}
\arguments{
\item{x}{A named vector.}

\item{val}{A named vector with components to replace corresponding components in x.}

\item{add}{If FALSE, only existing elements of x are returned.}
}
\value{
A modified version of x, with the elements of val replacing the elements of x
}
\description{
Modifies a vector by changing a subset of elements to match a second vector.
}
\details{
modifyVector modifies elements of a vector
}
\examples{
library("HelpersMG")
e <- c(M=10, L=20, J=30)
modifyVector(e, c(U=10, M=30))
modifyVector(e, c(U=10, M=30), add=FALSE)
}
\author{
Marc Girondot
}
