Resolved: How do I merge two vectors of same length into one vector that has the same length as well in R 0 By Isaac Tonny on 17/06/2022 Issue Share Facebook Twitter LinkedIn Question: I have two vectors like this: vec1<-c(0, 0, 1, 1, 0, 0, 0, 0, 0, 0) vec2<-c(0, 0, 0, 1, 0, 0, 1, 0, 1, 0) [/code] I want to merge it somehow to turn it into this: [code]vec<-c(0, 0, 1, 1, 0, 0, 1, 0, 1, 0) [/code] Is there any way to do this? Answer: We can use pmax [code]pmax(vec1, vec2) [1] 0 0 1 1 0 0 1 0 1 0 or with | +(vec1|vec2) If you have better answer, please add a comment about this, thank you! merge r vector
Resolved: When converting markdown to latex with pandoc, how can I end a block before the next heading?26/03/2023