in R, Let's say I have strings like:
str0 <- NA
str1 <- c("aaa")
str2 <- NA
str3 <- c("bbb")
str4 <- NA
when I do:
paste(str0, str1, str2, str3, str4, sep=',')
I got:
,aaa,,bbb,
But what I really need is:
aaa,bbb
So how can I ignore the comma at begin, at last and at the middle (more then 2 commas)? Thanks in advance!