Skip to content

want to drop levels of table vector & join two vector(appending)

3 messages · sagarnikam123, Petr Savicky, David Winsemius

#
is have vector from table stored in s variable
[1] R P Y A C P V E S C D R R F S R S A D L T R H I R I
Levels: A C D E F G H I K L M N P Q R S T V Y

--
View this message in context: http://r.789695.n4.nabble.com/want-to-drop-levels-of-table-vector-join-two-vector-appending-tp4356851p4356851.html
Sent from the R help mailing list archive at Nabble.com.
#
On Sat, Feb 04, 2012 at 06:07:01AM -0800, sagarnikam123 wrote:
Hi.

Is as.character(), what you are looking for?

  as.character(s)

   [1] "R" "P" "Y" "A" "C" "P" "V" "E" "S" "C" "D" "R" "R" "F" "S" "R" "S" "A" "D"
  [20] "L" "T" "R" "H" "I" "R" "I"

Petr Savicky.
#
On Feb 4, 2012, at 9:07 AM, sagarnikam123 wrote:

            
If you want to join two factor vectors you need first coerce to  
character vectors, use c() on them and if you want a factor of the  
combined vector, then assign the result of factor() again.
David Winsemius, MD
West Hartford, CT