Hello,

I am attempting to manipulate strings in which there are differing amounts
of whitespace before and after each element taht I want to keep (any word,
letter, or number). However, after strsplit and unlist, I know how to select
specific elements with "[ ]", but I want to select instead all elements that
are not missing. That is, do not select any elements that are simply "".

output <- c("a     b   8888      6")

gsub(" ","",unlist(strsplit(output,"  ",fixed=TRUE)))
[1] "a"    ""     "b"    "8888" ""     ""     "6"

Thanks! Scott Chamberlain

	[[alternative HTML version deleted]]

