All Questions
2 questions
3
votes
1
answer
228
views
obtain the position of elements of Y that a are in X in R
In R,
I have a vector of 5 unique elements:
X<-c("A","B","C","D","E")
And a vector of repeated elements:
Y<- c("A","C","M","Z","B","C","C","R","V","D","D","B","A","V","E","E")
I want to ...
3
votes
2
answers
6k
views
How add rownames with no dimensions in R
> Cases <- c(4,46,98,115,88,34)
> Cases
[1] 4 46 98 115 88 34
> str(Cases)
num [1:6] 4 46 98 115 88 34
I want to name row as "total.cases" and I got error attempt to set rownames ...