Skip to main content
added 6 characters in body
Source Link
user88
user88

This simple line of code does the thing:

((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)]

((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)]

if xx is the vector in question.

This simple line of code does the thing:

((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)]

if x is the vector in question.

This simple line of code does the thing:

((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)]

if x is the vector in question.

Source Link

This simple line of code does the thing:

((c(x,0,0) + c(0,x,0) + c(0,0,x))/3)[3:(length(x)-1)]

if x is the vector in question.