Learn R Programming

tropAlgebra (version 0.1.0)

copyVector: Copy Vector

Description

This function copies the 1st vector's values in the 2nd vector, Vectors must have equal length..

Usage

copyVector(x,y)

Arguments

x

A vector to be copy

y

A vector in which vector is to be copy.

Value

returns y copied from x

Details

e.g. x is a vector x<-c(1,2,3,4) and y is an empty vector y<-c(NA,NA,NA,NA) we want copy vector 'x' into 'y'. This fuction do this copyVector(x,y) now values of 'y' vector will be same as of 'x' vector

Examples

Run this code
# NOT RUN {
  x<-c(1,2,3,4)
  y<-c(NA,NA,NA,NA)
   copyVector(x,y)
# }

Run the code above in your browser using DataLab