Why aren't you using as.character instead of drop.levels?
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

swonder03 <ramey.steven@gmail.com> wrote:

I'm using the package 'gdata' and 'drop.levels' in the following code as a
simplified example of what I want to do, pinpointing the issue of isolating
variable in a data frame:

/dfNamesAndHeight <- data.frame("Name" = c('Bill','Bob','Bo'), "Height" =
c(73,68,83))
name_Bob <- drop.levels(dfNamesAndHeight[2,1])
cat(name_Bob, " is a good guy.") 
/

The output is "> 1 is a good guy". Print instead of cat returns ">Error in
print.default(xx, quote = quote, ...) : invalid 'quote' argument". When you
just enter 'name_Bob' the output is:

" >[1] Bob
Levels: Bob"

Is there any way to isolate 'Bob' without the 'Levels: Bob'? 


--
View this message in context: http://r.789695.n4.nabble.com/Drop-ALL-Levels-of-a-Data-Frame-Object-tp3903788p3903788.html
Sent from the R help mailing list archive at Nabble.com.

_____________________________________________

R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


	[[alternative HTML version deleted]]

