Message-ID: <CAM_vjun+69HW9bAQJbgf2DuVYxgfKJ=gsOXoK_LKYXzVHmdYpg@mail.gmail.com>
Date: 2011-12-12T19:50:29Z
From: Sarah Goslee
Subject: Variables from a Dataframe
In-Reply-To: <1323719071.45129.YahooMailNeo@web26508.mail.ukl.yahoo.com>
Without a reproducible example it's impossible to say for certain,
but I'd try
cbind.data.frame() instead of cbind().
You need to have a data frame, not a matrix, for the result.
Sarah
On Mon, Dec 12, 2011 at 2:44 PM, Jose Bustos Melo <jbustosmelo at yahoo.es> wrote:
> Hello everyone,
>
> I want make a variable selection? from a dataframe, but when I build this new object (using cbind) the new table (which is a matrix) I lost all the original factor names in the variables. I get 1,2,3....
>
> Someone would be so kind and tell me if there's is a ny way to get variables in a dataframe, but not changing these factor to numbers?
>
> Thank you all.
> Jos?
--
Sarah Goslee
http://www.functionaldiversity.org