From gregor.kastner at wu.ac.at  Wed Apr  2 08:43:10 2014
From: gregor.kastner at wu.ac.at (Gregor Kastner)
Date: Wed, 2 Apr 2014 08:43:10 +0200
Subject: [Rd] Typeof for character vector in dataframe returns integer
In-Reply-To: <CAGSjAUD3nJj_1zq3J3=7ERNtXRPF0QqMU2Ut52H5wzRnzF1XCw@mail.gmail.com>
References: <CAGSjAUCx7B3_vavmXQrQTtgAF1BO03YZXuutE3hdb7rJcjfS3Q@mail.gmail.com>
	<CAPPM_gRmK3Xh0SLPAc5avbWzgjRdOrYSZApQLqaxqBeOTiXiiw@mail.gmail.com>
	<CAGSjAUCrBD7_qcoieJMZSeKD_CfFs+euE5PFQEW7iKoSViUrrw@mail.gmail.com>
	<CAPPM_gQfD=dvC-6ez=VORgZ_nNsJKCPuuyH0nrQBYMB7R=KgYA@mail.gmail.com>
	<CAGSjAUD3nJj_1zq3J3=7ERNtXRPF0QqMU2Ut52H5wzRnzF1XCw@mail.gmail.com>
Message-ID: <20140402084310.7b148d77@mine>

Hi Sandip,

> Sorry for the wrong interpretation. So how to avoid that ? I mean how to
> forcefully make it character vector ?

As indicated by Joshua, ?data.frame will show you the way:

df <- data.frame(gender, age, stringsAsFactors = FALSE)
 
Best,
/g



[Rd] Typeof for character vector in dataframe returns integer
Gregor Kastner