.BG
.VE $Header: /usr3/s/current/s/.help/RCS/append,v 1.2 83/12/30 19:23:57 rab Exp $
.FN append
.FN replace
.TL
append replace: Data Merging
.CS
append(x, values, after)
replace(x, list, values)
.PP
.AG x
vector of data to be edited.  Missing values (NAs) are
allowed.
.AG list
indices of the elements in `x' to be  replaced.
.AG values
vector of values to replace the list of elements, or to be
appended after the element given.  If `values' is shorter
than `list', it is reused cyclically.  Missing values (NAs)
are allowed.
.AG after
index in `x' after which `values' are appended.  `after'=0
puts `values' at the beginning.
.RT
the edited vector, to be assigned back to `x', or used in
any other way.
Remember, unless the result is assigned back to `x', `x' will
not be changed.
.EX
x <- replace(x,3,1.5)     #Replace x[3] with 1.5
x[3]<-1.5       # Alternative: replaces x[3] with 1.5

x <- append(x,c(3.4,5.7),6)     #Append two values in x[7],x[8]

y <- replace(x,c(3,7,8,9),0)     #Replace the four elements with 0
.KW basic*
.KW manip
.WR
